drahnr / cargo-spellcheck

Checks all your documentation for spelling and grammar mistakes with hunspell and a nlprule based checker for grammar
Apache License 2.0
314 stars 32 forks source link

Adding a footnote gives false positives #315

Open aatifsyed opened 8 months ago

aatifsyed commented 8 months ago

Rustdoc supports footnotes^1

But adding footnotes as described in the rustdoc documentation gives a false positive:

$ git describe
v0.13.1
$ echo '//! This is an example of a footnote[^note].' > test.rs
$ cargo run --quiet -- check test.rs
error: spellcheck(Hunspell)
  --> /home/aatif/sources/cargo-spellcheck/test.rs:1
   |
 1 |  This is an example of a footnote[^note].
   |                          ^^^^^^^^
   | - footnote note, footnote-note, footnote, or tenderfoot
   |
   |   Possible spelling mistake found.

I have to add spacing before the [^1] to workaround this, but this affects the markup, which I don't think is right.

Sounds like a bug in the markdown parser? It should pass footnote, not footnote[^note] to hunspell

drahnr commented 8 months ago

See #312 and #311

drahnr commented 8 months ago

No need to close it, just wanted to point out that it is known, it's not solved yet (input & PRs welcome)