diff options
Diffstat (limited to 'src/test/rustdoc/markdown-summaries.rs')
-rw-r--r-- | src/test/rustdoc/markdown-summaries.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/rustdoc/markdown-summaries.rs b/src/test/rustdoc/markdown-summaries.rs new file mode 100644 index 000000000..b843e28e7 --- /dev/null +++ b/src/test/rustdoc/markdown-summaries.rs @@ -0,0 +1,27 @@ +#![crate_type = "lib"] +#![crate_name = "summaries"] + +//! This *summary* has a [link] and `code`. +//! +//! This is the second paragraph. +//! +//! [link]: https://example.com + +// @has search-index.js 'This <em>summary</em> has a link and <code>code</code>.' +// @!has - 'second paragraph' + +/// This `code` will be rendered in a code tag. +/// +/// This text should not be rendered. +pub struct Sidebar; + +// @has search-index.js 'This <code>code</code> will be rendered in a code tag.' +// @has summaries/sidebar-items.js 'This `code` will be rendered in a code tag.' +// @!has - 'text should not be rendered' + +/// ```text +/// this block should not be rendered +/// ``` +pub struct Sidebar2; + +// @!has summaries/sidebar-items.js 'block should not be rendered' |