Skip to content

Conversation

@kesara
Copy link
Member

@kesara kesara commented Oct 14, 2025

Fix for #531

@kesara kesara marked this pull request as ready for review October 14, 2025 04:56
self.end = end # ending line of block

wrapper = utils.TextWrapper(width=MAX_WIDTH)
wrapper = utils.TextWrapper(width=MAX_WIDTH, break_long_words=False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will still break_on_hyphens.

Copy link
Member Author

@kesara kesara Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cabo, yes.
Should this fix should be extended to hyphens as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. I'm not sure but I believe the underlying problem here is the double formatting. Any line breaks introduced during the first formatting in places that don't already have blank space are visible as spurious blank space after the second formatting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another problem caused by the dual formatting can be see in the editors' note in the abstract of

https://www.ietf.org/archive/id/draft-ietf-cbor-edn-literals-19.txt
https://www.ietf.org/archive/id/draft-ietf-cbor-edn-literals-19.html

The HTML version is correct (ignoring the spurios space starting the first line).
The TXT version loses the <br that should separate the first line from the second, as the second reflow gets rid of it.

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.

2 participants