Skip to content

Commit

Permalink
Forbid unknown H2
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Oct 10, 2024
1 parent 817060e commit d61e598
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/validate-headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def validate_headers(path: Path) -> None:
for header in headers_count:
if line.startswith(header):
headers_count[header] += 1
break
else:
assert not line.startswith("## "), f"{path=!s}: Invalid H2 {line=}"

assert title_count == 1, f"{path=!s}: Invalid {title_count=}"
for header, header_count in headers_count.items():
Expand Down

0 comments on commit d61e598

Please sign in to comment.