diff options
| author | Nomarian <nomarian@outlook.com> | 2025-10-09 11:42:22 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-10-12 21:00:37 +0200 |
| commit | 72c5b69a00429bf62a8879c7ce5f2d6c204cc0cf (patch) | |
| tree | 687db897d1dd6c55f5820bd439f3c10c25281dd5 /spellcheck.lua | |
| parent | 715441b44537c3ace7facfa722a3552c3a630fe4 (diff) | |
| download | vis-spellcheck-72c5b69a00429bf62a8879c7ce5f2d6c204cc0cf.tar.gz vis-spellcheck-72c5b69a00429bf62a8879c7ce5f2d6c204cc0cf.zip | |
typo_iter redundant pattern [%A] -> %A
Diffstat (limited to 'spellcheck.lua')
| -rw-r--r-- | spellcheck.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spellcheck.lua b/spellcheck.lua index 12e8d7b..5065774 100644 --- a/spellcheck.lua +++ b/spellcheck.lua @@ -135,7 +135,7 @@ local function typo_iter(text, typos, ignored) -- luacheck: ignore ignored -- 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. - local pattern = '[%A]' .. escape_lua_pattern(typo) .. '[%A]' + local pattern = '%A' .. escape_lua_pattern(typo) .. '%A' start, finish = text:find(pattern, index) if start then -- our pattern [%A]typo[%A] found it start = start + 1 -- ignore leading non letter char |
