Closed
Description
If a docstring has an escaped underscore (\_
), then clippy should treat that escaped underscore as any other (insignificant) character.
// lib.rs
//! Suppose a web LaTeX viewer is loaded.
//! (Note that backslashes are escaped for LaTeX.)
//!
//! \\[
//! \\prod\_{x\\in X} p\_x
//! \\]
results in
warning: you should put `prod_{x\in` between ticks in the documentation
--> src/lib.rs:5:10
|
5 | //! \\prod\_{x\\in X} p\_x
| ^^^^^^^^^^
|
= note: #[warn(doc_markdown)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.190/index.html#doc_markdown
warning: you should put `p_x` between ticks in the documentation
--> src/lib.rs:5:24
|
5 | //! \\prod\_{x\\in X} p\_x
| ^^^
|
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.190/index.html#doc_markdown