Repository navigation
Conversation
This branch has not been deployed
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.
Summary
Fixes #425.
protect_links=Trueadds angle brackets to URLs, but the paragraph wrapper still splits them at hyphens. Disable hyphen splitting in this mode so long URLs remain intact while surrounding text wraps at whitespace. This also keeps ordinary hyphenated words together when protection is enabled; default wrapping is unchanged.Changes
Testing
Python 3.13.13, using a virtualenv at
/tmp/html2text-20260930-venv:/tmp/html2text-20260930-venv/bin/python -m pytest --cov=./ --cov-report=xml:/tmp/html2text-20260930-coverage.xml -q— 198 passed./tmp/html2text-20260930-venv/bin/black --check --diff html2text/__init__.py test/test_html2text.py/tmp/html2text-20260930-venv/bin/flake8/tmp/html2text-20260930-venv/bin/isort --check-only --diff .uvx --from mypy==1.19.1 mypy --strict html2text/tmp/html2text-20260930-venv/bin/python -m build --outdir /tmp/html2text-20260930-distThe full
/tmp/html2text-20260930-venv/bin/black --check --diff .check flags an existing expression in untouchedhtml2text/config.pywith Black 26.5.1; the pristine base has the same failure. Existing pytest parametrization deprecation warnings remain. Other Python versions and operating systems were not tested locally.