Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Treat punctuation as part of a word for softwrap. #12471

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rhogenson
Copy link
Contributor

In addition to the examples in the tests, wrapping at punctuation tends to break URLs across lines which makes them more difficult to copy-paste. For code, the result is more subjective, so I will show a few examples here

Before:
before1

After:
after1

Before:
before2

After:
after2

Fixes #11428

In addition to the examples in the tests, wrapping at punctuation tends
to break URLs across lines which makes them more difficult to
copy-paste. For code it tends to give better results as well, except in
cases where max_wrap is very small.
@darshanCommits
Copy link
Contributor

I never knew I needed this. thanks

@nik-rev
Copy link
Contributor

nik-rev commented Jan 10, 2025

Wow, thank you for this! Absolutely 100% agree with darshanCommits

I think the code is easier to read now!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Soft wrapping does a line break in the middle of ".,"
3 participants