Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/web/scripts/sync-docs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@
description: "All notable changes to this project will be documented in this file."
---`;

const body = changelogMd.replace(/^# Changelog\n/, "");
// Strip HTML comments (<!-- ... -->) before emitting MDX. They are valid in the
// GitHub-rendered CHANGELOG (used for maintainer-only notes) but MDX v3 rejects
// them ("use {/* */}"), which fails the fumadocs/Turbopack build. They are not
// published-docs content, so drop them, then collapse the blank-line gap left
// behind so the generated MDX stays tidy.
const body = changelogMd
.replace(/^# Changelog\n/, "")
.replace(/<!--[\s\S]*?-->/g, "")

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization High

This string may still contain
<!--
, which may cause an HTML element injection vulnerability.
Comment on lines +35 to +37
.replace(/\n{3,}/g, "\n\n");

// Write changelog into the current (v1.5) source dir so it gets copied
const changelogDir = join(repoRoot, "content", "docs", "current", "changelog");
Expand Down