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

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Feb 16 14:07:14 CET 2023


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

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

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

    Fix small issues


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

c9b7f6b0443e1140a42ce44e1a64d101620a4f23
 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 d1b77b4eb..05a24de6e 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.