Docs: fix MDX markers blocking page refreshes (#46695)

Merged via squash.

Prepared head SHA: 56b25a9fb3
Co-authored-by: velvet-shark <126378+velvet-shark@users.noreply.github.com>
Co-authored-by: velvet-shark <126378+velvet-shark@users.noreply.github.com>
Reviewed-by: @velvet-shark
This commit is contained in:
Radek Sienkiewicz
2026-03-15 02:58:59 +01:00
committed by GitHub
parent df3a247db2
commit e3b7ff2f1f
7 changed files with 18 additions and 26 deletions

View File

@@ -51,7 +51,7 @@ function replaceBlockLines(
}
function renderKimiK2Ids(prefix: string) {
return MOONSHOT_KIMI_K2_MODELS.map((model) => `- \`${prefix}${model.id}\``);
return [...MOONSHOT_KIMI_K2_MODELS.map((model) => `- \`${prefix}${model.id}\``), ""];
}
function renderMoonshotAliases() {
@@ -90,8 +90,8 @@ async function syncMoonshotDocs() {
let moonshotText = await readFile(moonshotDoc, "utf8");
moonshotText = replaceBlockLines(
moonshotText,
"{/_ moonshot-kimi-k2-ids:start _/ && null}",
"{/_ moonshot-kimi-k2-ids:end _/ && null}",
'[//]: # "moonshot-kimi-k2-ids:start"',
'[//]: # "moonshot-kimi-k2-ids:end"',
renderKimiK2Ids(""),
);
moonshotText = replaceBlockLines(
@@ -110,8 +110,8 @@ async function syncMoonshotDocs() {
let conceptsText = await readFile(conceptsDoc, "utf8");
conceptsText = replaceBlockLines(
conceptsText,
"{/_ moonshot-kimi-k2-model-refs:start _/ && null}",
"{/_ moonshot-kimi-k2-model-refs:end _/ && null}",
'[//]: # "moonshot-kimi-k2-model-refs:start"',
'[//]: # "moonshot-kimi-k2-model-refs:end"',
renderKimiK2Ids("moonshot/"),
);