[latex3-commits] [git/LaTeX3-latex3-latex3] luacolor: Fix small issues (709cc77c7)

Marcel Fabian Krüger tex at 2krueger.de
Thu Jun 10 10:59:10 CEST 2021


Repository : https://github.com/latex3/latex3
On branch  : luacolor
Link       : https://github.com/latex3/latex3/commit/709cc77c7bcb8441e010c03b61a28aa9b2f313ba

>---------------------------------------------------------------

commit 709cc77c7bcb8441e010c03b61a28aa9b2f313ba
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu Jun 10 10:57:03 2021 +0200

    Fix small issues


>---------------------------------------------------------------

709cc77c7bcb8441e010c03b61a28aa9b2f313ba
 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 2bd48ab50..6e4b0e019 100644
--- a/l3backend/l3backend-color.dtx
+++ b/l3backend/l3backend-color.dtx
@@ -1293,7 +1293,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}
 %
@@ -1303,7 +1303,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
@@ -1330,7 +1330,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}
 %
@@ -1439,7 +1439,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.