Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

bpo-30680: textwrap support for true (Unicode) em-dashes #2224

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

Conversation

jonathaneunice
Copy link
Contributor

@jonathaneunice jonathaneunice commented Jun 15, 2017

textwrap specifically 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

@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Dec 8, 2018
auvipy
auvipy approved these changes May 31, 2019
@JelleZijlstra
Copy link
Member

JelleZijlstra commented Feb 18, 2022

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:

  • It will need a NEWS entry
  • On the issue, @methane expressed concerns about implementing this just em-dashes vs. implementing the full Unicode line-breaking algorithm. That will have to be resolved.

Also going to close and reopen to retrigger CI.

@github-actions
Copy link

github-actions bot commented Mar 21, 2022

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Mar 21, 2022
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Jul 28, 2022
@github-actions
Copy link

github-actions bot commented Aug 28, 2022

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review stale Stale PR or inactive for long period of time. type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants