OSDN Git Service

ltj-adjust.lua: now works again
[luatex-ja/luatexja.git] / src / ltj-adjust.lua
index 3882c51..22c0db7 100644 (file)
@@ -174,7 +174,8 @@ end
 -- step 1: 行末に kern を挿入(句読点,中点用)
 local ltjd_glyph_from_packed = ltjd.glyph_from_packed
 local function aw_step1(p, res, total)
-   local x = node_tail(getlist(p)); if not x then return false end
+   local head = getlist(p)
+   local x = node_tail(head); if not x then return false end
    -- x: \rightskip
    x = node_prev(x); if not x then return false end
    if getid(x) == id_glue and getsubtype(x) == 15 then
@@ -206,7 +207,7 @@ local function aw_step1(p, res, total)
       local kn = node_new(id_kern)
       setfield(kn, 'kern', (res.name=='shrink' and -1 or 1) * xk)
       set_attr(kn, attr_icflag, FROM_JFM)
-      insert_after(p, x, kn)
+      insert_after(head, x, kn)
       return true
    else return false
    end