refactor(notes): use options object for renderCodeFile params

This commit is contained in:
Julien Calixte
2026-04-27 19:58:24 +02:00
parent 9d6f70546e
commit cf5567de7c
3 changed files with 10 additions and 7 deletions

View File

@@ -164,11 +164,15 @@ const renderMarkdown = (content: string, env?: Record<string, unknown>) => {
return env ? md.render(content, env) : md.render(content)
}
export const renderCodeFile = async (
rawContent: string,
lang: string | null,
export const renderCodeFile = async ({
rawContent,
lang,
filename
}: {
rawContent: string
lang: string | null
filename?: string
): Promise<string> => {
}): Promise<string> => {
await useShikiji()
const heading = filename ? `# ${filename}\n\n` : ""
if (lang !== null) {