summaryrefslogtreecommitdiff
path: root/macros/optex/pkg/vlna.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/optex/pkg/vlna.opm')
-rw-r--r--macros/optex/pkg/vlna.opm7
1 files changed, 3 insertions, 4 deletions
diff --git a/macros/optex/pkg/vlna.opm b/macros/optex/pkg/vlna.opm
index c613d48cc4..743b254d01 100644
--- a/macros/optex/pkg/vlna.opm
+++ b/macros/optex/pkg/vlna.opm
@@ -10,7 +10,7 @@
% vlna.opm is based on Lua code from the package `luavlna` (by Michal Hoftich
% and Miro HronĨok). See `texdoc luavlna` or end of this file for more information.
-\_codedecl \singlechars {Preventing single-chars prepositions and more <2021-01-08>}
+\_codedecl \singlechars {Preventing single-chars prepositions and more <2023-06-23>}
\_namespace{vlna}
@@ -34,11 +34,10 @@
set_singlechars = function(lang,chars)
if (lang == "") then return nil end
- local utf_gmatch = unicode.utf8.gmatch
local chars = chars or ""
local singlechars = {}
- for char in unicode.utf8.gmatch(chars,"(\_csstring\%a)") do
- singlechars[char] = true
+ for pos, char in utf8.codes(chars) do
+ singlechars[utf8.char(char)] = true
end
luavlna.singlechars(lang,singlechars)
end