[latex3-commits] [git/LaTeX3-latex3-latex3] luacolor: Fix small issues (bc2fd4fa4)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Feb 15 22:19:38 CET 2023
Repository : https://github.com/latex3/latex3
On branch : luacolor
Link : https://github.com/latex3/latex3/commit/bc2fd4fa446e13a26a0b42a0df14af698dce9d04
>---------------------------------------------------------------
commit bc2fd4fa446e13a26a0b42a0df14af698dce9d04
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Thu Jun 10 10:57:03 2021 +0200
Fix small issues
>---------------------------------------------------------------
bc2fd4fa446e13a26a0b42a0df14af698dce9d04
l3backend/l3backend-color.dtx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/l3backend/l3backend-color.dtx b/l3backend/l3backend-color.dtx
index f3576578a..3f73aafd3 100644
--- a/l3backend/l3backend-color.dtx
+++ b/l3backend/l3backend-color.dtx
@@ -1386,7 +1386,7 @@ local color_attr = luatexbase.new_attribute("color")
% \begin{macro}{map}
% A map between color strings and their color_index, plus the tracking number.
% \begin{macrocode}
-local map = {n = 0}
+local map = {}
% \end{macrocode}
% \end{macro}
%
@@ -1396,7 +1396,7 @@ local map = {n = 0}
local function color_index(color)
local n = map[color]
if not n then
- n = map.n + 1
+ n = #map + 1
map[n] = color
map[color] = n
end
@@ -1423,7 +1423,7 @@ local node_new = node.new
local node_traverse = node.traverse
local saveboxresources = tex.saveboxresources
local set_attribute = tex.setattribute
-local type = node.type
+local node_type = node.type
local subtype = node.subtype
% \end{macrocode}
%
@@ -1532,7 +1532,7 @@ local function traverse(list,color,dry_run)
elseif get_type(list) == id_list_disc then
head = list.replace
else
- module_error("l3color","Wrong list type: " .. type(list.id))
+ module_error("l3color","Wrong list type: " .. node_type(list.id))
return color
end
% \end{macrocode}
More information about the latex3-commits
mailing list.