gh-74865: textwrap support for true (Unicode) em-dashes#2224
Open
jonathaneunice wants to merge 3 commits intopython:mainfrom
Open
gh-74865: textwrap support for true (Unicode) em-dashes#2224jonathaneunice wants to merge 3 commits intopython:mainfrom
jonathaneunice wants to merge 3 commits intopython:mainfrom
Conversation
auvipy
approved these changes
May 31, 2019
Member
|
Unfortunately this PR has languished for a long time. Sorry for that! Linking back to the issue explicitly: https://bugs.python.org/issue30680 I'm willing to help see this PR through to completion, if there's still interest in it. I haven't looked closely yet, but:
Also going to close and reopen to retrigger CI. |
|
This PR is stale because it has been open for 30 days with no activity. |
|
This PR is stale because it has been open for 30 days with no activity. |
|
This PR is stale because it has been open for 30 days with no activity. |
Member
|
Why em-dash is special than any other Unicode special characters? |
|
This PR is stale because it has been open for 30 days with no activity. |
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.
textwrapspecifically recognizes and specially treats the ASCII simulation of an em-dash (two or more consecutive hyphens). It does nothing, however, to recognize and treat true em-dashes (aka'\N{EM DASH}','\u2014', or U+2014). Real em-dashes should get at least as good a treatment as simulated em-dashes.This PR adds parallel treatment, plus tests.
(Some tests for "degenerate" cases of the simulated em-dash, e.g. three or more consecutive hyphens, are not replicated for the true em-dash, because repeating the true em-dash has no common sensible meaning.)
https://bugs.python.org/issue30680