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

stops parsing after first //! block #79

Open
wookietreiber opened this issue Aug 26, 2022 · 0 comments
Open

stops parsing after first //! block #79

wookietreiber opened this issue Aug 26, 2022 · 0 comments

Comments

@wookietreiber
Copy link

I've noticed the following limitations, which I'd like to report:

  • the content after the first //! block is missing
  • #![doc = include_str(...)] is not included

It looks like the parser only considers the first block of lines starting with //! and stops at the first line that doesn't start with //!.

Minimal Reproducible Example

This is src/lib.rs:

//! start of document
//!
//! # Examples
//!
//! ```rust,no_run
#![doc = include_str!("../examples/hello.rs")]
//! ```
//!
//! end of document

pub fn hello() {
    println!("hello");
}

This is examples/hello.rs:

fn main() {
    hello::hello();
}

The stuff after the first //! block is missing, i.e. neither the hello.rs example code, nor the end of document bit:

$ cargo readme --version
cargo-readme v3.2.0

$ cargo readme --no-title
start of document

## Examples

```rust
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

1 participant