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

rustdoc: Enable smart punctuation #76690

Closed
camelid opened this issue Sep 14, 2020 · 8 comments · Fixed by #79423
Closed

rustdoc: Enable smart punctuation #76690

camelid opened this issue Sep 14, 2020 · 8 comments · Fixed by #79423
Assignees
Labels
A-markdown-parsing Area: Markdown parsing for doc-comments C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Sep 14, 2020

Split off from #76687.


@rustbot modify labels: T-rustdoc C-enhancement

@rustbot rustbot added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 14, 2020
@camelid
Copy link
Member Author

camelid commented Sep 14, 2020

@rustbot claim

@camelid
Copy link
Member Author

camelid commented Sep 14, 2020

Uh, it looks like rustbot is editing my message and adding weird comments:

Split off from #76687.

---

@rustbot modify labels: T-rustdoc C-enhancement

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"camelid"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->

@camelid
Copy link
Member Author

camelid commented Sep 14, 2020

Cc @Mark-Simulacrum

@camelid
Copy link
Member Author

camelid commented Sep 14, 2020

It looks like smart punctuation doesn't work in headers:

image

@marcusklaas wasn't able to reproduce this in pulldown itself; I'm guessing rustdoc is doing something special with headers. Cc @GuillaumeGomez

@Mark-Simulacrum
Copy link
Member

Triagebot does that as a way of easily storing data per-issue (we could do it in the database now, we didn't have one back then). But it's expected and shouldn't really be a problem.

@pickfire
Copy link
Contributor

Is this a good thing? Wouldn't keeping things as it is is better?

@Mark-Simulacrum
Copy link
Member

@pickfire I think if you want to argue against doing this, giving reasons would be helpful.

I personally think given that we already use emoji and otherwise non-ASCII characters readily, it should be reasonable for us to generate smart quotes as well.

@pickfire
Copy link
Contributor

pickfire commented Sep 15, 2020

I do think emoji and other non-ASCII characters if specified would be good except for smart quote. It's like saying to use greek question mark which is the same as semi-colon when a semi-colon was seen in documentation to make it look a bit cooler.

One thing is copying, when others are copying the text, it will copy the utf-8 version of smart quotes which when displayed in terminals which in turn will make it look ugly and hard for text processing.

Auto changing text to emoji I am okay with that. But not automatically changing single quotes, double quotes and semi-colons. Personally I don't see much benefit to that, usually if users want it they would specifically type it out but otherwise it would be similar. In my humble opinion, looks wise the smart quotes are more ugly, but easier to distinguish opening and closing quotes, but still when copied and pasted it may not look so good.

@jyn514 jyn514 added the A-markdown-parsing Area: Markdown parsing for doc-comments label Nov 12, 2020
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Feb 22, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Feb 23, 2021
@bors bors closed this as completed in 1c2a949 Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-markdown-parsing Area: Markdown parsing for doc-comments C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants