Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions packages/docs/site/bin/refresh-changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const existingContent = fs.readFileSync(destinationPath, 'utf-8');
const frontmatterRegex = /^---\n([\s\S]*?)\n---/;
const existingFrontmatter = existingContent.match(frontmatterRegex)?.[0] || '';

// The destination file's frontmatter sets `format: md` so Docusaurus parses
// it as plain CommonMark instead of MDX. Without that, unescaped `{...}` or
// `<...>` in PR titles (e.g. `@php-wasm/{web,node}-5-2`) would be treated as
// JSX and crash the build.
const changelogWithFrontmatter = existingFrontmatter + '\n\n' + changelog;

// Write the modified changelog to the destination file
Expand Down
Loading
Loading