Enable smart punctuation

This commit is contained in:
Camelid 2020-09-15 16:18:05 -07:00
parent bb587b1a17
commit a0f9d4beec
3 changed files with 16 additions and 2 deletions

View File

@ -52,11 +52,12 @@ pub(crate) fn opts() -> Options {
| Options::ENABLE_FOOTNOTES
| Options::ENABLE_STRIKETHROUGH
| Options::ENABLE_TASKLISTS
| Options::ENABLE_SMART_PUNCTUATION
}
/// A subset of [`opts()`] used for rendering summaries.
pub(crate) fn summary_opts() -> Options {
Options::ENABLE_STRIKETHROUGH
Options::ENABLE_STRIKETHROUGH | Options::ENABLE_SMART_PUNCTUATION
}
/// When `to_string` is called, this struct will emit the HTML corresponding to

View File

@ -4,6 +4,6 @@ extern crate inner;
// @has add_docs/struct.MyStruct.html
// @has add_docs/struct.MyStruct.html "Doc comment from 'pub use', Doc comment from definition"
// @has add_docs/struct.MyStruct.html "Doc comment from pub use, Doc comment from definition"
/// Doc comment from 'pub use',
pub use inner::MyStruct;

View File

@ -0,0 +1,13 @@
#![crate_name = "foo"]
//! This is the "start" of the 'document'! How'd you know that "it's" the start?
//!
//! # Header with "smart punct'"
//!
//! [link with "smart punct'" -- yessiree!][]
//!
//! [link with "smart punct'" -- yessiree!]: https://www.rust-lang.org
// @has "foo/index.html" "//p" "This is the “start” of the document! Howd you know that “its” 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!"