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:
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
- name: Markdownlint
|
- name: Markdownlint
|
||||||
run: bundle exec mdl *.md docs/
|
run: bundle exec mdl *.md docs/
|
||||||
- name: HTML Beautifier
|
- 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 }}
|
name: ${{ matrix.name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||||
<html <%= common_html_attributes %>>
|
<html <%= common_html_attributes %> id="mailer_layout">
|
||||||
<head>
|
<head>
|
||||||
<title><%= t("mailers.title") %></title>
|
<title><%= t("mailers.title") %></title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
|||||||
Reference in New Issue
Block a user