[language-html] Fix indentation after self-closing tags

This commit is contained in:
Andrew Dupont 2024-02-09 09:51:41 -08:00
parent c188a26730
commit cc20d7055d

View File

@ -1,7 +1,7 @@
((start_tag) @indent
; Only indent if this isn't a self-closing tag.
(#not-match? @indent "^<(?:area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)\\s"))
(#not-match? @indent "^<(?:area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)(?=\\s|>)"))
; `end_tag` will still match when only `</div` is present. Without enforcing
; the presence of `>`, the dedent happens too soon.