Skip to content

Commit f1581ed

Browse files
committed
Test that code does not get smart-punctuated
1 parent a0f9d4b commit f1581ed

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/rustdoc/smart-punct.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-tidy-linelength
2+
13
#![crate_name = "foo"]
24

35
//! This is the "start" of the 'document'! How'd you know that "it's" the start?
@@ -7,7 +9,22 @@
79
//! [link with "smart punct'" -- yessiree!][]
810
//!
911
//! [link with "smart punct'" -- yessiree!]: https://www.rust-lang.org
12+
//!
13+
//! # Code should not be smart-punct'd
14+
//!
15+
//! `this inline code -- it shouldn't have "smart punct"`
16+
//!
17+
//! ```
18+
//! let x = "don't smart-punct me -- please!";
19+
//! ```
20+
//!
21+
//! ```text
22+
//! I say "don't smart-punct me -- please!"
23+
//! ```
1024
1125
// @has "foo/index.html" "//p" "This is the “start” of the ‘document’! How’d you know that “it’s” the start?"
1226
// @has "foo/index.html" "//h1" "Header with “smart punct’”"
1327
// @has "foo/index.html" '//a[@href="https://www.rust-lang.org"]' "link with “smart punct’” – yessiree!"
28+
// @has "foo/index.html" '//code' 'this inline code -- it shouldn\'t have "smart punct"'
29+
// @has "foo/index.html" '//pre' 'let x = "don\'t smart-punct me -- please!";'
30+
// @has "foo/index.html" '//pre' 'I say "don\'t smart-punct me -- please!"'

0 commit comments

Comments
 (0)