diff --git a/packages/docs/src/routes/api/qwik/api.json b/packages/docs/src/routes/api/qwik/api.json index fe1f23a2be3..3595bd3ec82 100644 --- a/packages/docs/src/routes/api/qwik/api.json +++ b/packages/docs/src/routes/api/qwik/api.json @@ -2214,4 +2214,4 @@ "mdFile": "core.withlocale.md" } ] -} +} \ No newline at end of file diff --git a/scripts/api-docs.ts b/scripts/api-docs.ts index 39cc93a171a..70d91c3281c 100644 --- a/scripts/api-docs.ts +++ b/scripts/api-docs.ts @@ -211,8 +211,7 @@ async function createApiMarkdown(a: ApiData) { md.push(``); // sanitize / adjust output - const content = m.content - .replace(//g, '') + const content = removeHtmlComments(m.content) // .replace(//g, '' .replace(/\\#\\#\\# (\w+)/gm, '### $1') .replace(/\\\[/gm, '[') @@ -232,6 +231,15 @@ async function createApiMarkdown(a: ApiData) { return mdOutput; } +function removeHtmlComments(input: string): string { + let previous; + do { + previous = input; + input = input.replace(/