-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
There was a problem hiding this 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...)
There was a problem hiding this 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.
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. |
I don't feel strongly, but still don't think html-escapes should be in plain text files just for a typographic nicety. |
Co-authored-by: Oscar Gustafsson <[email protected]>
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. |
There was a problem hiding this 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.
Will Unicode render correctly on all browsers (and text editors)? |
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
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst