fix(docgen): escape MDX-incompatible patterns in Mintlify output#668
Merged
dangrondahl merged 1 commit intomainfrom Feb 24, 2026
Merged
fix(docgen): escape MDX-incompatible patterns in Mintlify output#668dangrondahl merged 1 commit intomainfrom
dangrondahl merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes MDX parsing errors in Mintlify documentation output by escaping angle-bracket placeholders and curly braces that MDX incorrectly interprets as JSX syntax.
Changes:
- Extended regex pattern to match lowercase placeholders (e.g.,
<fingerprint>) and pipe-delimited patterns (e.g.,<hours|days|weeks|months>) in addition to uppercase placeholders - Applied
escapeMintlifyProse()to flag descriptions, fixing unescaped${{ github.head_ref }}patterns in flag tables - Added HTML tag filtering to preserve legitimate HTML tags while escaping placeholders
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/docgen/mintlify.go | Updated regex pattern to match all placeholder patterns; added htmlTags map for filtering; applied escaping to flag sections |
| internal/docgen/mintlify_test.go | Added comprehensive test cases for lowercase placeholders, pipe patterns, and double curly braces |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jumboduck
approved these changes
Feb 24, 2026
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.
Summary
<hours|days|weeks|months>) and lowercase placeholders (e.g.<fingerprint>,<commit_sha>) that MDX interprets as invalid JSX tagsescapeMintlifyProse()to flag section content — previously only the synopsis was escaped, leaving${{ github.head_ref }}unescaped in flag table descriptionsFixed parsing errors
kosli_attest_jira.md—${{ github.head_ref }}in flag tablekosli_diff_snapshots.md/kosli_get_snapshot.md—<hours|days|weeks|months>kosli_get_artifact.md—<fingerprint>,<commit_sha>Test plan
docgentests passkosli docs --mintlifyand verify no MDX parsing errors inmint dev