Files
neovim/runtime
zeertzjq 2fbc82820b vim-patch:964a495: runtime(html): match plain tag and attribute names as keywords (#41522)
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.

closes: vim/vim#21155

964a495bef

Co-authored-by: Julien Voisin <julien.voisin@dustri.org>
2026-08-28 10:09:15 +08:00
..
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00