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

`find_spans()` of `CheckableChunk` only checks for linefeed as newline.

KuabeM opened this issue · comments

Describe the bug

Method find_spans() in chunk.rs only recgonizes a linefeed as newlines, but should also acknowledge CRLF and friends. See FIXME in chunk.rs:219.

To Reproduce

Steps to reproduce the behaviour:

  1. A file containing \r\n as newline
  2. Run cargo spellcheck on that file
  3. find_spans() will be broken

Expected behavior

Everything works on files with \r\n as expected.

Please complete the following information:**

  • System: Arch Linux
  • Obtained: git
  • Version: cargo-spellcheck 0.4.7-alpha.0

I'm investigating this in branch korbinian-fix-find-spans, I've just pushed a first guess (which isn't working 😞) plus a unit test. I'll open a PR if I found a proper solution.

Ping 🙃

Hopsa, I guess I should have a look again :D thanks for the reminder!

No worries, also #137 ;) - might be easier to do it at all at once

Any roadblocks I could help with?

Nope, just me not having enough time. As you suggested I'm actually doing #137. It makes more sense to rewrite the whole thing