• R/O
  • HTTP
  • SSH
  • HTTPS

luatexja: Commit

ソースコードの管理場所


Commit MetaInfo

Revision09881cb7ab237e96ec6ccb2629d186b9375d29a3 (tree)
Time2020-10-23 18:05:42
AuthorHironori Kitagawa <h_kitagawa2001@yaho...>
CommiterHironori Kitagawa

Log Message

fix "! This can't happen (weird par dir)" error

Change Summary

Incremental Difference

--- a/src/ltj-jfmglue.lua
+++ b/src/ltj-jfmglue.lua
@@ -3,7 +3,7 @@
33 --
44 luatexbase.provides_module({
55 name = 'luatexja.jfmglue',
6- date = '2020-10-05',
6+ date = '2020-10-22',
77 description = 'Insertion process of JFM glues, [x]kanjiskip and others',
88 })
99 luatexja.jfmglue = luatexja.jfmglue or {}
@@ -1220,27 +1220,10 @@ do
12201220 end
12211221 end
12221222
1223-local ensure_tex_attr = ltjb.ensure_tex_attr
1224-local function cleanup(mode, TEMP)
1225- -- luatexja.ext_show_node_list(to_node(head), '> ', print)
1226- -- adjust attr_icflag for avoiding error
1227- if tex.getattribute(attr_icflag)~=0 then ensure_tex_attr(attr_icflag, 0) end
1228- node_free(kanji_skip);
1229- node_free(xkanji_skip); node_free(TEMP)
1230-
1231- if mode then
1232- local h = node_next(head)
1233- if getid(h) == id_penalty and getfield(h, 'penalty') == 10000 then
1234- h = node_next(h)
1235- if getid(h) == id_glue and getsubtype(h) == 15 and not node_next(h) then
1236- return false
1237- end
1238- end
1239- end
1240- return head
1241-end
12421223 -------------------- 外部から呼ばれる関数
12431224
1225+local ensure_tex_attr = ltjb.ensure_tex_attr
1226+local tex_getattr = tex.getattribute
12441227 -- main interface
12451228 function luatexja.jfmglue.main(ahead, mode, dir)
12461229 if not ahead then return ahead end
@@ -1267,9 +1250,11 @@ function luatexja.jfmglue.main(ahead, mode, dir)
12671250 end
12681251 handle_list_tail(mode, last)
12691252 end
1270- --luatexja.ext_show_node_list(to_node(ahead ), '>A ', print)
1271- --print()
1272- return cleanup(mode, TEMP)
1253+ -- adjust attr_icflag for avoiding error
1254+ if tex_getattr(attr_icflag)~=0 then ensure_tex_attr(attr_icflag, 0) end
1255+ node_free(kanji_skip);
1256+ node_free(xkanji_skip); node_free(TEMP)
1257+ return head
12731258 end
12741259 end
12751260
Show on old repository browser