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

Doc comments are interpreted as markdown code blocks. #370

Open
bddap opened this issue Apr 29, 2019 · 1 comment
Open

Doc comments are interpreted as markdown code blocks. #370

bddap opened this issue Apr 29, 2019 · 1 comment

Comments

@bddap
Copy link

bddap commented Apr 29, 2019

Cargo doc currently emits tons of warnings when run on this codebase.

cargo clean --doc && cargo doc
...
warning: could not parse code block as Rust code
   --> src/toxencryptsave/mod.rs:189:5
    |
189 | /     Decrypts provided `data` with `self` `PassKey`.
190 | |
191 | |     Decrypted data is smaller by [`EXTRA_LENGTH`](./constant.EXTRA_LENGTH.html)
192 | |     than encrypted data.
...   |
212 | |     assert_eq!(passkey.decrypt(&[]), Err(DecryptionError::Null));
213 | |     ```
    | |_______^
    |
    = note: error from rustc: unknown start of token: `

A bit of background. Markdown supports two modes for code blocks. The more common mode uses tick marks like so:

```
// code block..
```

but there is another mode that uses indentation:

    // code block..

The issue likely has to do with rustdoc not stripping whitespace from multiline doc comments in its unindent-comments pass.

@kpp
Copy link
Member

kpp commented Apr 29, 2019

I have development profficiency and I’m a naitive english speaker so I can proofread documentation if requested.

Yes, this would be very helpful.

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