Repository navigation
Find a content-language meta that is not the first meta - #357
Merged
benoit74 merged 1 commit intoOct 19, 2026
Merged
Conversation
benoit74
approved these changes
Oct 19, 2026
benoit74
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, nice catch and fix
Fixes openzim#356 Signed-off-by: Sarthak <sarthakshreshtha345@gmail.com>
benoit74
force-pushed
the
fix/language-from-any-meta
branch
from
October 19, 2026 13:02
b04be56 to
d7b7c14
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #357 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 42 42
Lines 2799 2798 -1
Branches 417 417
=========================================
- Hits 2799 2798 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Fixes #356
find_language_inonly looked at the first<html>,<body>and<meta>tag, so acontent-language<meta>was missed whenever another<meta>(usually<meta charset>) came before it. It now checks every matching tag, in the same order as before.Added a case with
<meta charset>before thecontent-language<meta>totest_find_language_order; it fails before the change and passes after it. Ruff passes; the rest of the test suite has the same results asmain(locally only the GIF tests fail, as gifsicle is not installed).