docs: finish the EmptyPdf wording sweep - #113
Merged
Merged
Conversation
Why this change was needed: #106 was about a claim, not a comment. The repo said in five places that Auto mode "catches scanned PDFs". #111 corrected two of them, and closed the issue. The remaining three included the most user-visible copy: the PdfModeArg::Auto variant doc, which clap renders in `webclaw --help` under Possible values. The claim is wrong in a way that has already cost us. EmptyPdf fires only when the normalized text has zero non-whitespace characters, so a scanned page carrying a page number or footer stamp returns Ok with unusable text. An outside contributor built #104/#105 on the wording this sweep removes. What changed: - crates/webclaw-pdf/src/lib.rs: the PdfMode::Auto variant doc. - crates/webclaw-cli/src/main.rs: the PdfModeArg::Auto variant doc, which is the one that reaches users through --help. - examples/README.md: the --pdf-mode auto example comment. Verified: grep for "catches scanned" / "scanned/image-only" / "Scanned PDFs return" across the repo now returns nothing, and `webclaw --help` prints "- auto: Error if the PDF yields no non-whitespace text". Problem solved: No surface still tells a reader that Auto detects scanned documents. Behaviour is untouched; every changed line is a comment. Refs: #106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the wording fix started in #111 (issue #106).
#106 was about a claim, not a comment. "Auto mode catches scanned PDFs" appeared in five places. #111 fixed two and closed the issue. This clears the other three.
The one that matters most is
PdfModeArg::Auto, because clap renders that doc comment inwebclaw --help:Why the claim is worth chasing down
EmptyPdffires only when the normalized text has zero non-whitespace characters. A scanned page carrying a page number or a footer stamp returnsOkwith unusable text. An outside contributor built #104 and #105 on exactly this wording, which is what #106's "Why it matters" section was about.Changed
crates/webclaw-pdf/src/lib.rs—PdfMode::Autovariant doccrates/webclaw-cli/src/main.rs—PdfModeArg::Autovariant doc (the--helpone)examples/README.md— the--pdf-mode autoexample commentBehaviour untouched; every changed line is a comment.
Verified: grep for
catches scanned/scanned/image-only/Scanned PDFs returnacross the repo now returns nothing.