Skip to content

Enable smart punctuation #79423

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 5 commits into from
Feb 23, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test that code does not get smart-punctuated
  • Loading branch information
camelid committed Feb 8, 2021
commit f1581ed8fc752417a02d7664067e6895d2f448eb
17 changes: 17 additions & 0 deletions src/test/rustdoc/smart-punct.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore-tidy-linelength

#![crate_name = "foo"]

//! This is the "start" of the 'document'! How'd you know that "it's" the start?
Expand All @@ -7,7 +9,22 @@
//! [link with "smart punct'" -- yessiree!][]
//!
//! [link with "smart punct'" -- yessiree!]: https://www.rust-lang.org
//!
//! # Code should not be smart-punct'd
//!
//! `this inline code -- it shouldn't have "smart punct"`
//!
//! ```
//! let x = "don't smart-punct me -- please!";
//! ```
//!
//! ```text
//! I say "don't smart-punct me -- please!"
//! ```

// @has "foo/index.html" "//p" "This is the “start” of the ‘document’! How’d you know that “it’s” the start?"
// @has "foo/index.html" "//h1" "Header with “smart punct’”"
// @has "foo/index.html" '//a[@href="https://www.rust-lang.org"]' "link with “smart punct’” – yessiree!"
// @has "foo/index.html" '//code' 'this inline code -- it shouldn\'t have "smart punct"'
// @has "foo/index.html" '//pre' 'let x = "don\'t smart-punct me -- please!";'
// @has "foo/index.html" '//pre' 'I say "don\'t smart-punct me -- please!"'