Repository navigation
fix(docs): escape angle-bracket placeholders in generated docs - #60
Merged
Merged
Conversation
Deploy Docs on main has failed since 2026-09-07 because reference/modules.mdx line 315 has a bare `<name>`, which MDX parses as an unclosed JSX tag. docgen's formatDescription parses option descriptions with goldmark and dropped anything goldmark saw as inline HTML, so "stackpanel.doctor.<name>." came out as "stackpanel.doctor..". d3dd7aa put the placeholder back by hand, unescaped. Keep inline HTML as literal text instead: nixos-render-docs renders option descriptions with HTML disabled, so these are placeholders, not tags, and the existing escapeMDX pass writes them as `\<name\>`. A full regeneration would still break the build in two places, both in frontmatter, which the docs build parses as YAML rather than MDX: - escapeMDX also rewrote the frontmatter, turning `{` in a quoted module description into `\{`, an invalid YAML escape. It now skips frontmatter. - CLI pages wrote cmd.Short unquoted, and `stack setup`'s "Reconcile the project: report, confirm, apply" is invalid YAML (the checked-in page had been hand-edited to avoid it). CLI descriptions now go through escapeYAMLString, which now also escapes backslashes. Generated pages: only the lines these fixes change are updated (5 reference, 6 CLI), each identical to the fixed generator's output. A full `generate-docs` run is left out because the checked-in pages have drifted from the option definitions (26 files removed, 52 added, 50 changed), which needs its own change. That full output now builds. Refs: stackpanel-thq.23
Contributor
|
Preview deployed to |
Contributor
|
Docs preview |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deploy Docs has failed on every main run since Sep 7. The docs generator (docgen) dropped
<name>placeholders from option descriptions because it parsed them as HTML tags. A later hand-edit (d3dd7aa) put one back intoreference/modules.mdxunescaped, and MDX treats it as an unclosed JSX tag.The fix is in the generator:
\<name\>.Verification by the implementer:
go buildpasses, and all 26 docgen tests pass.bun run buildinapps/docs(Deploy Docs' build step) builds all 495 pages.modules.mdxreproduces the CI error exactly.Refs stackpanel-thq.23