Skip to content
Open
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
7 changes: 7 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ function syncTips(): Plugin {
// Escape angle brackets outside of code blocks/inline code so MDX doesn't
// treat them as JSX (e.g. `Mapping<B256, bool>` in prose).
content = escapeAngleBrackets(content)
// Quote frontmatter `authors:` values that start with a YAML reserved
// character (e.g. `@handle`). Upstream TIPs occasionally include GitHub
// handles like `@0xrusowsky`, which break YAML parsing unless quoted.
content = content.replace(
/^(authors:\s*)([@&*!|>%#`].*)$/m,
(_m, prefix, value) => `${prefix}"${value.replace(/"/g, '\\"')}"`,
)
const outputPath = path.join(outputDir, file.name.replace('.md', '.mdx'))
await fs.writeFile(outputPath, content)
}),
Expand Down
Loading