Skip to content

Drop whitespace-only tags in compute_tags - #413

Open
ahmershahdev wants to merge 1 commit into
openzim:mainfrom
ahmershahdev:compute-tags-empty
Open

ahmershahdev wants to merge 1 commit into
openzim:mainfrom
ahmershahdev:compute-tags-empty

Conversation

@ahmershahdev

@ahmershahdev ahmershahdev commented Nov 23, 2026 •

Copy link
Copy Markdown

compute_tags() dropped empty parts before stripping them, so a whitespace-only part such as the one after the last ; in "a; b; " came out as "". A scraper passing that set to TagsMetadata gets ValueError: Missing value (empty not allowed).

Each tag is now stripped first and empty ones are dropped after. Added a whitespace_only case to test_compute_tags (it fails on main with an extra "") and a ### Fixed changelog entry.

Fixes #412

@ahmershahdev
ahmershahdev marked this pull request as ready for review November 23, 2026 14:40

This branch has not been deployed

No deployments
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.

compute_tags keeps empty tags

1 participant