Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Em dashes instead of consecutive hyphens. #25211

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

Merged
merged 3 commits into from
Feb 20, 2023
Merged

Conversation

tfpf
Copy link
Contributor

@tfpf tfpf commented Feb 14, 2023

PR Summary

Two consecutive hyphens were used to approximate an em dash when it wasn't available. Today, we have Unicode, and also an HTML character code for it. (The latter is, according to this Stack Overflow answer, the official method to insert em dashes.)

Also, it looks more professional than consecutive hyphens.

There are consecutive hyphens in multiple documentation files, but since the README file is directly presented to the user, it might be a good first place to make this change.

PR Checklist

Documentation and Tests

  • [N/A] Has pytest style unit tests (and pytest passes)
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [N/A] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [N/A] Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

Copy link
Member

@oscargus oscargus left a comment

Choose a reason for hiding this comment

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

I checked in my copy of The Chicago Manual of Style and, to my disappointment/surprise, there should indeed be no spaces around an em dash.

It is not clear to me if using HTML-encoded characters in the thing to do in markdown though, so I'll not merge at this stage, but just confirm the space issue. Someone else that thinks HTML-encoding should go in markdown can merge though.

(I do not really know, just feels a bit "wrong", but then these is probably no "right" way of doing it either, using Unicode is most likely guaranteed to be messed up sooner or later...)

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

I'm not I favour of this. Markdown is meant to be human readable if possible as a text file and this definitely reduces readability. I'd just make these hyphens with spaces around them like the first sentence. Note this is informal and n dashes with spaces are fine in British English.

@oscargus
Copy link
Member

If nothing else, it should be adjusted so that it is consistently using the same character(s) as em dash. Right now there is a single dash for the first and two for the remaining two.

I do not have a strong opinion on spaces or not. As said I expected that there should be spaces (however, I am not native in English, but I am quite sure that there are spaces in Swedish), but reading up that is the "correct" way. Which we of course can ignore.

@jklymak
Copy link
Member

jklymak commented Feb 14, 2023

I don't feel strongly, but still don't think html-escapes should be in plain text files just for a typographic nicety.

@tfpf
Copy link
Contributor Author

tfpf commented Feb 15, 2023

Agreed that HTML escape sequences in a file which is supposed to be readable is not good. I have made the suggested changes … but will all browsers render Unicode correctly?

Happy to close this either way.

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

I'm pro having all of these as a single dash with a space on each side (-), which makes the markdown human readable.

@tfpf
Copy link
Contributor Author

tfpf commented Feb 16, 2023

Will Unicode render correctly on all browsers (and text editors)?

@jklymak jklymak merged commit 380afc8 into matplotlib:main Feb 20, 2023
@tfpf tfpf deleted the emdash branch February 21, 2023 13:56
@QuLogic QuLogic added this to the v3.8.0 milestone Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants