From 500a12c36f8112a7b66a5e10f0733b3374e3c1f0 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 28 Aug 2020 15:21:51 +0200 Subject: ignore empty typos apparently in the typo list produced by aspell there is a blank line which messes with our search for typos. --- spellcheck.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit