summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/char-utf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/char-utf.lua')
-rw-r--r--tex/context/base/mkiv/char-utf.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/char-utf.lua b/tex/context/base/mkiv/char-utf.lua
index 2d557d4af..0aeadcc85 100644
--- a/tex/context/base/mkiv/char-utf.lua
+++ b/tex/context/base/mkiv/char-utf.lua
@@ -39,6 +39,7 @@ local utfchartabletopattern = lpeg.utfchartabletopattern
local formatters = string.formatters
local allocate = utilities.storage.allocate or function() return { } end
+local mark = utilities.storage.mark or allocate
local charfromnumber = characters.fromnumber
@@ -86,7 +87,13 @@ local graphemes = characters.graphemes
local collapsed = characters.collapsed
local mathlists = characters.mathlists
-if not graphemes then
+if graphemes then
+
+ mark(graphemes)
+ mark(collapsed)
+ mark(mathlists)
+
+else
graphemes = allocate()
collapsed = allocate()
@@ -167,9 +174,9 @@ if not graphemes then
mlists = nil
if storage then
- storage.register("characters/graphemes", characters.graphemes, "characters.graphemes")
- storage.register("characters/collapsed", characters.collapsed, "characters.collapsed")
- storage.register("characters/mathlists", characters.mathlists, "characters.mathlists")
+ storage.register("characters/graphemes", graphemes, "characters.graphemes")
+ storage.register("characters/collapsed", collapsed, "characters.collapsed")
+ storage.register("characters/mathlists", mathlists, "characters.mathlists")
end
end