[latex3-commits] [git/LaTeX3-latex3-latex3] luacolor: Fix small issues (82d1418af)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Feb 16 13:48:00 CET 2023
Repository : https://github.com/latex3/latex3
On branch : luacolor
Link : https://github.com/latex3/latex3/commit/82d1418af2cc0c5a8f289cfeb1004c2739d37f97
>---------------------------------------------------------------
commit 82d1418af2cc0c5a8f289cfeb1004c2739d37f97
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Thu Jun 10 10:57:03 2021 +0200
Fix small issues
>---------------------------------------------------------------
82d1418af2cc0c5a8f289cfeb1004c2739d37f97
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 2baf96da9..0f5fc2712 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.