2021-11-26 17:03:16 -06:00
|
|
|
#![allow(rustdoc::invalid_rust_codeblocks)]
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has bad_codeblock_syntax/fn.foo.html
|
|
|
|
//@ has - '//*[@class="docblock"]' '\_'
|
2018-12-15 15:25:50 -06:00
|
|
|
/// ```
|
|
|
|
/// \_
|
|
|
|
/// ```
|
|
|
|
pub fn foo() {}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has bad_codeblock_syntax/fn.bar.html
|
|
|
|
//@ has - '//*[@class="docblock"]' '`baz::foobar`'
|
2018-12-15 15:25:50 -06:00
|
|
|
/// ```
|
|
|
|
/// `baz::foobar`
|
|
|
|
/// ```
|
|
|
|
pub fn bar() {}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has bad_codeblock_syntax/fn.quux.html
|
|
|
|
//@ has - '//*[@class="docblock"]' '\_'
|
2018-12-15 15:25:50 -06:00
|
|
|
/// ```rust
|
|
|
|
/// \_
|
|
|
|
/// ```
|
|
|
|
pub fn quux() {}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has bad_codeblock_syntax/fn.ok.html
|
|
|
|
//@ has - '//*[@class="docblock"]' '\_'
|
2018-12-15 15:25:50 -06:00
|
|
|
/// ```text
|
|
|
|
/// \_
|
|
|
|
/// ```
|
|
|
|
pub fn ok() {}
|
2020-01-15 16:42:04 -06:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has bad_codeblock_syntax/fn.escape.html
|
|
|
|
//@ has - '//*[@class="docblock"]' '\_ <script>alert("not valid Rust");</script>'
|
2020-01-15 16:42:04 -06:00
|
|
|
/// ```
|
|
|
|
/// \_
|
|
|
|
/// <script>alert("not valid Rust");</script>
|
|
|
|
/// ```
|
|
|
|
pub fn escape() {}
|
2020-01-17 17:44:44 -06:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has bad_codeblock_syntax/fn.unterminated.html
|
|
|
|
//@ has - '//*[@class="docblock"]' '"unterminated'
|
2020-01-17 17:44:44 -06:00
|
|
|
/// ```
|
|
|
|
/// "unterminated
|
|
|
|
/// ```
|
|
|
|
pub fn unterminated() {}
|