Repository navigation
docs: fix default class tutorial tag matching - #1091
Open
sridharkalaibala wants to merge 1 commit into
Open
sridharkalaibala wants to merge 1 commit into
sridharkalaibala wants to merge 1 commit into
Conversation
This branch has not been 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.
Fixes #1026.
The CSS-class tutorial's greedy expression consumes the rest of the line, so two links on one line receive a class only on the first link. It can also match
articleorabbrwhen the configured tag isa.Match only the opening tag name with a whitespace-or-
>boundary, and insert the class immediately after it. Attributes remain untouched, including quoted>characters and attributes on multiple lines. Add a short explanation to the tutorial.Five regression checks execute the bindings extracted from the documented snippet through the actual converter: repeated links, tag-name prefixes, quoted angle brackets, multiline attributes, and the tutorial's list classes. All five fail before the change (the list case differs only in redundant whitespace) and pass afterward.
Validation:
npm testpasses all 3,179 tests across 26 files; ESLint reports no errors and one existing unused-variable warning indecodeEntities.js.git diff --checkpasses. Based ondevelopas requested by CONTRIBUTING.md. No library runtime code or dependencies changed; no browser matrix was run for this documentation example.Prepared with OpenAI Codex assistance and validated locally on Node 24 / Windows.