Skip to content

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
@JelleZijlstra
Copy link
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:

  • 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

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

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
@arhadthedev arhadthedev changed the title bpo-30680: textwrap support for true (Unicode) em-dashes gh-74865: textwrap support for true (Unicode) em-dashes Feb 14, 2023
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Feb 15, 2023
@github-actions
Copy link

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 18, 2023
@methane
Copy link
Member

methane commented Apr 1, 2023

Why em-dash is special than any other Unicode special characters?

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Apr 2, 2023
@github-actions
Copy link

github-actions bot commented May 3, 2023

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 May 3, 2023
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.

10 participants