OSDN Git Service

Fix \raise, \lower, \moveleft, \moveright.
[luatex-ja/luatexja.git] / src / ltj-pretreat.lua
index 484a07f..8cf30a2 100644 (file)
@@ -26,7 +26,7 @@ local floor = math.floor
 local has_attr = Dnode.has_attribute
 local set_attr = Dnode.set_attribute
 local node_traverse = Dnode.traverse
-local node_remove =luatexja.Dnode_remove -- Dnode.remove
+local node_remove = Dnode.remove
 local node_next = (Dnode ~= node) and Dnode.getnext or node.next
 local node_prev = (Dnode ~= node) and Dnode.getprev or node.prev
 local node_free = Dnode.free
@@ -84,11 +84,9 @@ do
          elseif uid==DIR then
            if has_attr(p, attr_icflag)<PROCESSED_BEGIN_FLAG  then
               ltjs.list_dir = has_attr(p, attr_dir)
-              if not node_next(p) and real_head==p then
-                 return p, true
-              end
+           else
+              wtd[#wtd+1] = p; node_remove(head, p)
            end
-           wtd[#wtd+1] = p; node_remove(head, p)
          end
       end
       return p
@@ -104,11 +102,7 @@ do
       while p do
         local flag
         local pfunc = suppress_hyphenate_ja_aux[getid(p)]
-        if pfunc then p, flag = pfunc(p) end
-        if flag then 
-           stop_time_measure('ltj_hyphenate')
-           return h
-        end
+        if pfunc then p = pfunc(p) end
         p = node_next(p)
       end
       stop_time_measure('ltj_hyphenate'); start_time_measure('tex_hyphenate')