Repository navigation
fix: CommonMark fences and quote-aware component tags (0.1.12-alpha) - #33
Merged
Merged
Conversation
TypeTable tracked registered rows by Name, so a second row with the same name (an overload, or two rows describing one thing) was dropped without a warning. Rows are now tracked by their TypeRow component.
The slot extractor only matched three-backtick fences, so a longer fence showing a shorter one was paired with the wrong closing line: the next razor:preview rendered as plain code and tags inside the example became empty placeholders. Fences are now three or more backticks or tildes, closed by a run of the same character at least as long. Empty fences, longer closing fences and trailing spaces are handled.
Inline tags were matched with a regex that ended the tag at the first '>', so a '>' inside a quoted attribute value dropped the component. They now go through RazorTagScanner, as razor:preview does: quoted values can hold '>', another tag, or text that looks like an attribute. Code spans are restored per attribute value, so a quote inside a span can't split it. A tag with an unterminated quote, or one that spans a blank line, is passed through as raw markup.
A child tag routed into a RenderFragment parameter was matched with the same regex as inline tags, so a '>' in one of its attribute values cut the tag short and leaked the rest into the slot. ShellDocs.Markdown now exposes its internals to ShellDocs.Components so SlotRenderer can use RazorTagScanner.
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.
Parser fixes found while rewriting the ShellDocs docs site on 0.1.11, plus the 0.1.12-alpha release prep. Merging this and pushing tag
v0.1.12-alphapublishes the release.Fixed
razor:previewrendered as plain code and tags inside the example became empty placeholders. Fences now follow CommonMark: three or more backticks or tildes, closed by a run of the same character at least as long. Empty fences and trailing spaces are handled.>inside a quoted attribute value ended an inline component tag early, so the component silently disappeared. Inline tags are now read withRazorTagScanner, asrazor:previewalready was.<Icon title="a > b">), which leaked the rest of the tag into the slot.<TypeTable>dropped rows that shared aName.Added
~~~), including~~~razor:preview.Changed
ShellDocs.Markdownexposes its internals toShellDocs.Components, so both use the one tag scanner.Release
<Version>is0.1.12-alpha; the CHANGELOG has the dated section and link; ROADMAP is updated.Verification
main.0.1.12-alpha; that version is not on nuget.org.mainand on this branch: output is identical for every page, so existing content is unaffected.After merging
git checkout main && git pull git tag v0.1.12-alpha git push origin v0.1.12-alpha🤖 Generated with Claude Code