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(
srcDir: string,
options: MarkdownOptions = {},
base = '/',
includeLastUpdatedData = false,
cleanUrls = false,
options: MarkdownOptions,
base: string,
includeLastUpdatedData: boolean,
cleanUrls: boolean,
siteConfig: SiteConfig
) {
const md = await createMarkdownRenderer(

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

Loading…
Cancel
Save