feat: support equals sign and surrounding whitespace in \htmlData attribute values#4112
Merged
edemaine merged 6 commits intoKaTeX:mainfrom Dec 7, 2025
Merged
Conversation
edemaine
approved these changes
Dec 7, 2025
Member
edemaine
left a comment
There was a problem hiding this comment.
Looks good! I edited the code style a bit, and added some more tests.
I also changed the behavior for how the value gets treated, removing the trim that removed any whitespace. (Kept it for the key though.) I figure that, while we're enabling = in the value, we should do the same for leading and trailing whitespace. This may change some values out there, but I think this can be viewed as a bug fix. Let me know whether you agree; if so, I'll merge.
Contributor
Author
|
Yes, I like keeping whitespace for the value, too 👍 Thank you for bearing with my technical restrictions that led to some subpar commits =) |
KaTeX-bot
added a commit
that referenced
this pull request
Dec 7, 2025
## [0.16.27](v0.16.26...v0.16.27) (2025-12-07) ### Features * support equals sign and surrounding whitespace in \htmlData attribute values ([#4112](#4112)) ([c77aaec](c77aaec))
Member
|
🎉 This PR is included in version 0.16.27 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What is the previous behavior before this PR?
\htmlData{foo=<value>}{}results in a parse error if<value>contains equals signs.What is the new behavior after this PR?
All equals signs but the first (which marks where the attribute name ends and the value starts) are ignored. Values can contain equals signs now.
Closes #4108
@edemaine Continuing from #4109, with apologies for failing to git properly.
New changes compared to #4109:
"="viaindexOf.As before, I am unable to get the dev setup working locally; I have run none of the tests.