Problem: Several tag and attribute names are highlighted with regular
expression alternations even though they are plain words. A
:syn-match with an alternation is retried at nearly every
position of every tag.
Solution: Move the plain-word tag names (b, i, u, em, strong, head,
body, title, h1-h6) and the "label", "href" and "title"
attribute names into syn-keyword lists, leaving only the
genuinely hyphenated names "accept-charset" and "http-equiv"
as matches.
Profiling a 6000-line HTML file with :syntime, the converted rules drop from a combined 0.044s to 0.004s, lowering total per-rule syntax time by about 15%. Highlighting is unchanged except that a bare valueless "href" attribute is now highlighted as an attribute, consistent with a bare "title", which already behaved that way.
https://github.com/vim/vim/pull/21155
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Thanks, @dkearns fine with you?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()