Problem
The citation validator incorrectly flags valid internal links as "Unknown citation pattern" when the anchor ID contains backticks.
Reproduction Steps
- Validate markdown containing backtick anchors:
[**\`hasAnchor(anchorId: string): boolean\`**](#\`hasAnchor(anchorId%20string)%20boolean\`)
- Observe false negative:
Line 88: [**\`hasAnchor(anchorId: string): boolean\`**](#\`hasAnchor(anchorId%20string)
│ └─ Unknown citation pattern
│ └─ Suggestion: Use one of: cross-document [text](file.md#anchor), caret ^FR1, or wiki-style [[#anchor|text]]
Root Cause
The citation validator's regex patterns don't handle:
- Backticks within anchor IDs
- Special characters like parentheses and colons in anchor IDs
- URL-encoded spaces (%20) in anchor IDs
Expected Behavior
Internal links with complex anchor IDs (containing backticks, parentheses, URL-encoded characters) should be recognized as valid when:
- The anchor format follows Obsidian/GitHub markdown conventions
- The link renders correctly in Obsidian
Impact
- False negatives block legitimate edits
- Documentation authors must work around validator limitations
- Reduces trust in validation tool
Related
Acceptance Criteria
Definition of Done
Problem
The citation validator incorrectly flags valid internal links as "Unknown citation pattern" when the anchor ID contains backticks.
Reproduction Steps
Root Cause
The citation validator's regex patterns don't handle:
Expected Behavior
Internal links with complex anchor IDs (containing backticks, parentheses, URL-encoded characters) should be recognized as valid when:
Impact
Related
tools/citation-manager/design-docs/component-guides/ParsedDocument Implementation Guide.md:88Acceptance Criteria
%20,%28,%29)Definition of Done
npm run build -w tools/citation-manager && npm link -w tools/citation-manager