Make HTML Beautifier fail on nesting errors

This way we're also checking mistakes like closing tags that don't match
their opening element, which we detected by manually running HTML
Beautifier with the `-e` option, and fixed two commits ago.

Note there was a false positive in the mailer layout. We don't know the
cause. Maybe closing the ERB tag right before the HTML opening tag and
the lack of other attributes on the tag made HTML Beautifier think the
tag wasn't correctly open, but on the other hand, we have the exact same
line in other layouts where HTML Beautifier works fine. We're fixing it
by adding an HTML id attribute to the element.
This commit is contained in:
Javi Martín
2025-02-21 00:16:44 +01:00
parent b51aa31e6a
commit 96e99ce6c8
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ jobs:
- name: Markdownlint
run: bundle exec mdl *.md docs/
- name: HTML Beautifier
run: find app/ -name "*.html.erb" -exec bundle exec htmlbeautifier --lint-only --keep-blank-lines 1 {} +
run: find app/ -name "*.html.erb" -exec bundle exec htmlbeautifier --lint-only --keep-blank-lines 1 -e {} +
name: ${{ matrix.name }}
steps:
- name: Checkout code