Skip to content

Preserve link style when wrapping converted documents - #457

Open
Hugohong258 wants to merge 1 commit into
Alir3z4:masterfrom
Hugohong258:fix-preserve-link-style-during-wrapping
Open

Hugohong258 wants to merge 1 commit into
Alir3z4:masterfrom
Hugohong258:fix-preserve-link-style-during-wrapping

Conversation

@Hugohong258

Copy link
Copy Markdown

With wrap_links=False and a nonzero body width, the first handle() call renders inline links but optwrap() then changes inline_links to False. A later call on the same converter unexpectedly emits reference links. Remove that post-conversion configuration mutation and the documentation's outdated implication that disabling wrapping selects reference links. Existing first-call output remains unchanged.

This is a link-style instance of the reuse problems in #375; #453 separately addresses emphasis spacing. Six regression cases cover three widths and both link styles; two fail before the fix. The full suite passes 202 tests on Windows/Python 3.12.3. Black, isort, Flake8 and strict mypy 1.18.2 (configured Python 3.9 target) pass. Black emits its Python 3.13 target warning on this Python 3.12 host, and the suite retains three existing pytest deprecation warnings; other interpreters were not tested.

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.

1 participant