Skip to content

fix: escape backslashes in generated frontmatter descriptions - #396

Merged
ppeeou merged 1 commit into
mainfrom
fix/yaml-escape-backslash
Aug 8, 2026
Merged

ppeeou merged 1 commit into
mainfrom
fix/yaml-escape-backslash

Conversation

@ppeeou

@ppeeou ppeeou commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

The v2.0.0 website deploy failed: the generated docs/api/escapeRegExp.md frontmatter contained an unescaped backslash (\,) from the escapeRegExp JSDoc summary, which vitepress rejects as an unknown YAML escape sequence.

escapeYamlString in the api-documenter markdown plugin escaped quotes and newlines but not backslashes. Backslashes are now escaped first, then quotes.

Test plan

  • Regenerated the English docs: the escapeRegExp description now emits \\ (valid YAML)
  • Full vitepress build docs passes locally (was failing in 179ms on this file)

After merging, re-run the website workflow to deploy the v2.0.0 docs.

🤖 Generated with Claude Code

escapeYamlString handled quotes and newlines but not backslashes, so
the escapeRegExp JSDoc summary produced `\,` inside the YAML
description and broke the vitepress website build ("unknown escape
sequence"). Escape backslashes first, then quotes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ppeeou ppeeou self-assigned this Aug 8, 2026
@ppeeou
ppeeou merged commit 612d9e2 into main Aug 8, 2026
4 checks passed
@ppeeou
ppeeou deleted the fix/yaml-escape-backslash branch August 8, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant