AtomLinter / linter-spell-latex

Provider for Atom linter-spell package to enable LaTeX spell checking.
MIT License
8 stars 7 forks source link

Allowing linter-spell-latex to activate and to ignore most LaTeX syntax in spelling #42

Open mlangiu opened 4 years ago

mlangiu commented 4 years ago

Changed outdated getRanges method in LaTeX grammar to filterRanges and provided a more rigorous regex for excluding common LaTeX syntax elements.

Since the buffer is split into different ranges for spell checking we can still get false-positives, e.g., in \begin{footnotesize}, footnotesize may or may not be marked as a spelling error depending on whether it is in the same range as \begin{ and }. However, this PR greatly reduces these false-positives compared to before