fix(docs): escape hyphens in Mermaid diagram on Collections page#1262
fix(docs): escape hyphens in Mermaid diagram on Collections page#1262WilliamBerryiii merged 9 commits intomainfrom
Conversation
…ns page - Replace literal hyphens with `-` HTML entities in quoted node labels - Fixes Mermaid v11+ parse error for labels like `coding-standards` 🔧 - Generated by Copilot
There was a problem hiding this comment.
Advisory review, this PR is from a maintainer. Findings are informational only.
Overview
The core fix is technically correct and well-executed. - is the standard HTML entity workaround for Mermaid v11+'s parser ambiguity with hyphens in quoted node labels. All 7 hyphenated node labels were correctly updated, and the 6 non-hyphenated labels were correctly left unchanged.
Issue Alignment
✅ The PR addresses the Mermaid parse error described in #1230 (escape hyphens in quoted node labels that Mermaid v11+ misinterprets as edge/arrow syntax). The fix is scoped appropriately.
PR Template Compliance
✅ All required sections are filled in. "Bug fix" and "Documentation update" are correctly checked for a Mermaid syntax correction in a docs file. Testing describes a reasonable verification approach for a deterministic syntax fix.
hve-core-all, coding-standards, data-science, design-thinking, hve-core, project-planning, rai-planning, and installer (artifact count label)." However, INS["installer<br/>(2 artifacts)"] was correctly not modified (it contains no hyphens). The 8th diff line is actually the table separator row reformatting — not a Mermaid node label. This is a minor description inaccuracy that has no impact on the code change.
Coding Standards
✅ The Mermaid diagram fix follows the Docusaurus content instructions: <br/> is used for line breaks within node labels.
|| (see inline comment on line 35): The PR introduces an extra trailing pipe on the separator row, creating an implicit empty 5th column. This appears to be a side-effect of format:tables reformatting triggered alongside the Mermaid edits. While GitHub's GFM renderer is permissive and likely ignores it, it is an unintended deviation from the original and could cause issues in stricter parsers or lint runs.
Code Quality
✅ No security concerns. No logic errors. The - entity is the canonical workaround recommended by the Mermaid community for this parser behavior change in v11+.
Action Items
- Consider removing the spurious trailing
||from the table separator row (informational — does not block merging).
Note
🔒 Integrity filter blocked 1 item
The following item were blocked because they don't meet the GitHub integrity level.
- #1230
issue_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
To allow these resources, lower min-integrity in your GitHub frontmatter:
tools:
github:
min-integrity: approved # merged | approved | unapproved | none
rezatnoMsirhC
left a comment
There was a problem hiding this comment.
Thanks for picking this up! Just noticed a minor issue.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1262 +/- ##
==========================================
- Coverage 87.72% 87.71% -0.02%
==========================================
Files 61 61
Lines 9321 9321
==========================================
- Hits 8177 8176 -1
- Misses 1144 1145 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Pull Request
Description
Escaped hyphens in Mermaid diagram node labels on the Collections overview page. Mermaid v11+ (bundled via
@docusaurus/theme-mermaid 3.9.2) interprets bare hyphens inside["quoted-labels"]as link/arrow operators, causing a parse error visible to users:Replaced all literal hyphens inside quoted Mermaid node labels with
-HTML entities. The rendered output displays identically but parses correctly. Eight node labels were affected:hve-core-all,coding-standards,data-science,design-thinking,hve-core,project-planning,rai-planning, andinstaller(artifact count label).No other Mermaid diagrams in the docs use hyphens in the same quoted-label parsing context.
Related Issue(s)
Fixes #1230
Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md)Other:
.ps1,.sh,.py)Testing
-renders as-in Mermaid diagram output per the HTML entity specification.docs/— no other instances use hyphens in quoted node labels that would trigger the same parser bug.Checklist
Required Checks
Required Automated Checks
The following validation commands must pass before merging:
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run validate:skillsnpm run lint:md-linksnpm run lint:psnpm run plugin:generateSecurity Considerations
Additional Notes
The root cause is a Mermaid v11+ parser behavior change where hyphens in
[\"quoted labels\"]are ambiguous with edge/link syntax. The-entity workaround is the standard approach recommended by the Mermaid community. This affects only thegraph TDdiagram on the Collections page; other diagrams in the docs use hyphens only inside<br/>tags or subgraph labels, which parse in a different context.