Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code fences have "rust" added to closing fence #75

Open
detly opened this issue Mar 14, 2022 · 1 comment
Open

Code fences have "rust" added to closing fence #75

detly opened this issue Mar 14, 2022 · 1 comment

Comments

@detly
Copy link

detly commented Mar 14, 2022

The following doc comment:

//!
//! This crate frequently uses a trait bound like the following where subprocess
//! commands are required:
//!
//! ```none,actually-rust-but-see-https://github.com/rust-lang/rust/issues/63193
//! T where
//!     T: IntoIterator,
//!     T::Item: Into<OsString>
//! ```
//!
//! You can understand this as:
//! - `T` is anything that can turn into an iterator
//! - the iterator type is anything that can turn into an `OsString`
//!

Gets turned into:

This crate frequently uses a trait bound like the following where subprocess
commands are required:

```none,actually-rust-but-see-https://github.com/rust-lang/rust/issues/63193
T where
    T: IntoIterator,
    T::Item: Into<OsString>
```rust

You can understand this as:
- `T` is anything that can turn into an iterator
- the iterator type is anything that can turn into an `OsString`

The trailing ```rust should not be there. cargo doc seems to do the right thing, by comparison.

Using cargo-readme v3.2.0 on Rust 1.59.0 + Ubuntu 21.10.

@1sra3l
Copy link

1sra3l commented Mar 22, 2022

this also happens with using no-run in example code in documentation, such as in lib.rs
I think adding support for no-run is helpful.
It does not add it when I use sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants