OSDN Git Service

ltj-direction.lua: fix conflict with lua-visual-debug
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Fri, 7 Aug 2020 02:42:28 +0000 (11:42 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Fri, 7 Aug 2020 02:42:28 +0000 (11:42 +0900)
src/ltj-direction.lua
src/luatexja.lua

index 9a28a9a..4c6c3b6 100644 (file)
@@ -1058,8 +1058,7 @@ do
    local finalize_inner
    local function finalize_dir_node(db,new_dir)
       local b = getlist(db)
-      if getid(b)==id_whatsit and getsubtype(b)==sid_user
-         and getfield(b, 'user_id')==DIR then
+      while b and ((getid(b)~=id_hlist) and (getid(b)~=id_vlist)) do
          local ob = b; b = node_remove(b,b); setfield(db, 'head', b);
          node_free(ob)
       end
index 988f519..5c3b58e 100644 (file)
@@ -372,8 +372,7 @@ local function debug_show_node_X(p,print_fn, limit, inner_depth)
    local k = prefix
    local s
    local pt, pic = node_type(p.id), (has_attr(p, attr_icflag) or 0) % icflag_table.PROCESSED_BEGIN_FLAG
-   local base = prefix .. string.format('%X', pic)
-   .. ' ' .. pt .. ' ' .. tostring(p.subtype) .. ' '
+   local base = prefix .. string.format('%X', pic) .. ' ' .. pt .. ' ' .. tostring(p.subtype) .. ' '
    if pt == 'glyph' then
       s = base .. ' ' 
           .. (p.char<0xF0000 and utfchar(p.char) or '') 
@@ -505,6 +504,9 @@ local function debug_show_node_X(p,print_fn, limit, inner_depth)
             for i=1,#p.data do
                print_fn(s .. '  [' .. i .. '] = ' .. tostring(p.data[i].csname))
             end
+         elseif p.subtype==16 then
+            s = s .. ' mode=' .. p.mode .. ', literal="' .. p.data .. '"'
+            print_fn(s)
          else
             print_fn(s)
          end