Skip to content

Commit

Permalink
fix(text): Don't break URLs in annotation
Browse files Browse the repository at this point in the history
Fixes #1101
  • Loading branch information
kesara committed Feb 15, 2024
1 parent 4ecc42b commit 35e8a45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xml2rfc/writers/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -2749,7 +2749,8 @@ def render_reference(self, e, width, **kwargs):
text += '.'
for ctag in ('annotation', ):
for c in e.iterdescendants(ctag):
text = self.tjoin(text, c, width, **kwargs)
# use MAX_WIDTH here since text gets formatted later
text = self.tjoin(text, c, MAX_WIDTH, keep_url=True, **kwargs)
text = fill(text, width=width, fix_sentence_endings=False, keep_url=True, **kwargs).lstrip(stripspace)

text = indent(text, 11, 0)
Expand Down

0 comments on commit 35e8a45

Please sign in to comment.