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 blocks in documentation are spell checked #13

Open
sfackler opened this issue Aug 23, 2014 · 1 comment
Open

Code blocks in documentation are spell checked #13

sfackler opened this issue Aug 23, 2014 · 1 comment

Comments

@sfackler
Copy link

#![feature(phase)]
#[phase(plugin)]
extern crate spellck;

/// ```rust
/// println!("{}", "sup?");
/// ```
pub fn it_works() {
}
/home/sfackler/test/src/lib.rs:6:1: 6:28 warning: misspelled word: println, #[warn(misspellings)] on by default
/home/sfackler/test/src/lib.rs:6 /// println!("{}", "sup?");
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
@huonw
Copy link
Owner

huonw commented Aug 23, 2014

This is a little annoying to fix, doing it properly requires embedding a markdown parser (or reusing the one in rustdoc). A hack workaround is to have a dictionary file with these common words (fsvo common), e.g. https://github.com/huonw/spellck/blob/01ccbbbbd35bdfde1e8f01314cf68b08099c95de/src/stdlib.txt

(It would be neat to spellcheck any comments inside the code blocks.)

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