Skip to content

Commit 9a723d2

Browse files
committed
Add closing title tag validation
1 parent 830ecf4 commit 9a723d2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/test-html.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ jobs:
1515
--standalone --template=template.html --output=index.html README.md
1616
- name: Validate title tag
1717
run: |
18-
count=$(grep -o '<title>' index.html | wc -l)
19-
if [ "$count" -ne 1 ]; then
20-
echo "Expected exactly one <title> tag, found $count"
18+
count_open=$(grep -o '<title>' index.html | wc -l)
19+
count_close=$(grep -o '</title>' index.html | wc -l)
20+
if [ "$count_open" -ne 1 ] || [ "$count_close" -ne 1 ]; then
21+
echo "Expected exactly one <title> tag and one </title> tag, found $count_open and $count_close"
2122
exit 1
2223
fi
2324
close_count=$(grep -o '</title>' index.html | wc -l)

0 commit comments

Comments
 (0)