drahnr / cargo-spellcheck

Checks all your documentation for spelling and grammar mistakes with hunspell and a nlprule based checker for grammar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spellcheck doesn't recognize `<code>` tags

jyn514 opened this issue · comments

commented

Describe the bug

rust-lang/rust#74697 (comment)

error: spellcheck(Hunspell)
     --> rust/library/std/src/path.rs:2685
      |
 2685 |  The iterator will yield instances of <code>[io::Result]<[fs::DirEntry]></code>. New
      |                                              ^^
      | - oi, Io, oo, ii, ion, bio, Rio, or one of 7 others
      |
      |   Possible spelling mistake found.

This is not a mistake, <code> does exactly the same thing as backticks but with HTML tags instead. Libstd uses them to allow nesting HTML tags, or occasionally because rustdoc renders adjacent inline code blocks poorly.

To Reproduce:

  1. A file containing
<code>std::io</code>
  1. Run cargo spellcheck ...
  2. ...

Expected behavior

Screenshots

Please complete the following information:

  • System:
  • Obtained:
  • Version:

Additional context

commented

This also looks like a bug, it doesn't recognize HTML entities.

error: spellcheck(Hunspell)
     --> rust/library/std/src/path.rs:1609
      |
 1609 |  Converts a <code>[Box]&lt;[Path]&gt;</code> into a [`PathBuf`].
      |                                  ^
      |   Possible spelling mistake found