aboutsummaryrefslogtreecommitdiffstats
path: root/spellcheck.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spellcheck.lua')
-rw-r--r--spellcheck.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/spellcheck.lua b/spellcheck.lua
index de04cea..6a20172 100644
--- a/spellcheck.lua
+++ b/spellcheck.lua
@@ -84,9 +84,9 @@ local function typo_iter(text, typos, ignored)
return function(foo, bar)
repeat
typo = unfiltered_iterator(iter_state)
- until(not typo or not ignored[typo])
+ until(not typo or (typo ~= "" and not ignored[typo]))
- if typo and typo ~= "" then
+ if 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.