aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-08-28 15:21:51 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-08-28 15:21:51 +0200
commit500a12c36f8112a7b66a5e10f0733b3374e3c1f0 (patch)
treeab7ccfdc1cad1906ddfb86d9294bd4aef3cec370
parenta8212fda377d6527c7b76547aa7fb816c5cc62cb (diff)
downloadvis-spellcheck-500a12c36f8112a7b66a5e10f0733b3374e3c1f0.tar.gz
ignore empty typos
apparently in the typo list produced by aspell there is a blank line which messes with our search for typos.
-rw-r--r--spellcheck.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/spellcheck.lua b/spellcheck.lua
index 3d2888b..de04cea 100644
--- a/spellcheck.lua
+++ b/spellcheck.lua
@@ -86,7 +86,7 @@ local function typo_iter(text, typos, ignored)
typo = unfiltered_iterator(iter_state)
until(not typo or not ignored[typo])
- if typo then
+ if typo and typo ~= "" then
-- to prevent typos from being found in correct words before them
-- ("stuff stuf", "broken ok", ...)
-- we match typos only when they are enclosed in non-letter characters.