refactor(markdown): drop parameter defaults from createMarkdownToVueRenderFn

It is internal and its only caller passes every argument; apply the
fallbacks at the call site instead of hiding them in the signature
after the required siteConfig parameter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/5342/head
Divyansh Singh 1 month ago
parent f274a89146
commit dc98a2b9ac

@ -87,10 +87,10 @@ function getResolutionCache(siteConfig: SiteConfig) {
export async function createMarkdownToVueRenderFn( export async function createMarkdownToVueRenderFn(
srcDir: string, srcDir: string,
options: MarkdownOptions = {}, options: MarkdownOptions,
base = '/', base: string,
includeLastUpdatedData = false, includeLastUpdatedData: boolean,
cleanUrls = false, cleanUrls: boolean,
siteConfig: SiteConfig siteConfig: SiteConfig
) { ) {
const md = await createMarkdownRenderer( const md = await createMarkdownRenderer(

@ -126,10 +126,10 @@ export async function createVitePressPlugin(
if (lastUpdated) await cacheAllGitTimestamps(srcDir) if (lastUpdated) await cacheAllGitTimestamps(srcDir)
markdownToVue = await createMarkdownToVueRenderFn( markdownToVue = await createMarkdownToVueRenderFn(
srcDir, srcDir,
markdown, markdown ?? {},
config.base, config.base,
lastUpdated, lastUpdated ?? false,
cleanUrls, cleanUrls ?? false,
siteConfig siteConfig
) )
}, },

Loading…
Cancel
Save