Repository navigation
Conversation
Benchmark ResultsComparison of Open to see the benchmark results
Generated by phpbench against commit b830309 |
There was a problem hiding this comment.
🟢 Approval recommended
The focused pattern changes have regression coverage for opening and closing tags, with no identified blocking issues.
No open issues 🎉
What changed in this PR
Adds Unicode tag-name highlighting for HTML and XML, addressing #196 while preserving byte-based matching without the /u modifier.
Changes:
- Extends opening and closing tag patterns to accept non-ASCII bytes.
- Preserves HTML’s ASCII-letter start requirement while allowing non-ASCII XML starts.
- Adds pattern-level and full-language regression cases.
| File | Description |
|---|---|
| tests/Languages/Xml/XmlLanguageTest.php | Tests Unicode XML tag highlighting. |
| tests/Languages/Html/HtmlLanguageTest.php | Tests Greek and emoji HTML tag names. |
| src/Languages/Xml/Patterns/XmlOpenTagPattern.php | Extends XML opening-tag matching and tests. |
| src/Languages/Xml/Patterns/XmlCloseTagPattern.php | Extends XML closing-tag matching and tests. |
| src/Languages/Html/Patterns/HtmlOpenTagPattern.php | Extends HTML opening-tag matching and tests. |
| src/Languages/Html/Patterns/HtmlCloseTagPattern.php | Extends HTML closing-tag matching and tests. |
Review effort: Balanced
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 #196. Tag name patterns now accept non-ASCII characters (matched as UTF-8 bytes, so invalid UTF-8 input keeps working without the /u modifier). HTML still requires an ASCII letter first, per spec; XML allows non-ASCII name start chars. Added pattern and language tests.