Skip to content

Avoid exception with lowercase doctype - #1942

Merged
windymilla merged 1 commit into
DistributedProofreaders:masterfrom
windymilla:PPcomp-case
Sep 3, 2026
Merged

windymilla merged 1 commit into
DistributedProofreaders:masterfrom
windymilla:PPcomp-case

Conversation

@windymilla

Copy link
Copy Markdown
Collaborator
  1. If there is a doctype error, e.g. doctype rubbish, output sensible error
  2. Ignore case of doctype line of HTML file

Fixes #1939

1. If there is a doctype error, e.g. `doctype rubbish`, output
sensible error
2. Ignore case of `doctype` line of HTML file

Fixes DistributedProofreaders#1939
@windymilla
windymilla requested a review from srjfoo August 23, 2026 18:46
@windymilla

Copy link
Copy Markdown
Collaborator Author

Test files: ppcomp_test.zip

In master this causes an exception
In this branch, I get the following - the HTML parser fails to parse the HTML file:

Failed to parse HTML file
Fix the errors below in the HTML file before re-running ppcomp

260.25: Tag nav invalid
321.87: Tag aside invalid
324.46: Tag section invalid
331.87: Tag aside invalid
333.87: Tag aside invalid
335.87: Tag aside invalid
337.87: Tag aside invalid
339.87: Tag aside invalid

Check complete

@srjfoo srjfoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setup doesn't appear to fail on macOS, but if the PR fixes it for Win/Linux, go for it.

@windymilla
windymilla merged commit 34db57f into DistributedProofreaders:master Sep 3, 2026
1 check passed
@windymilla
windymilla deleted the PPcomp-case branch September 3, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PPcomp gives a traceback if HTML header is lowercase

2 participants