Skip to content

Commit

Permalink
[language-html] Fix indentation after self-closing tags
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed Feb 9, 2024
1 parent c188a26 commit cc20d70
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit cc20d70

Please sign in to comment.