summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luatexja/src/ltj-inputbuf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/generic/luatexja/src/ltj-inputbuf.lua')
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-inputbuf.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/macros/luatex/generic/luatexja/src/ltj-inputbuf.lua b/macros/luatex/generic/luatexja/src/ltj-inputbuf.lua
index 7f39b9b8d7..dc6ec46a56 100644
--- a/macros/luatex/generic/luatexja/src/ltj-inputbuf.lua
+++ b/macros/luatex/generic/luatexja/src/ltj-inputbuf.lua
@@ -8,12 +8,10 @@ luatexja.load_module 'charrange'; local ltjc = luatexja.charrange
local utflen = utf.len
local utfbyte = utf.byte
local utfchar = utf.char
-local node_new = node.new
-local node_free = node.free
local id_glyph = node.id 'glyph'
local getcatcode, getcount = tex.getcatcode, tex.getcount
local ltjc_is_japanese_char_curlist = ltjc.is_japanese_char_curlist
-
+local cnt_lineend = luatexbase.registernumber 'ltjlineendcomment'
local substituter
do
local uchar = utf.char
@@ -71,7 +69,7 @@ local function add_comment(buffer)
if (te ~= -1) and (getcatcode(te)==5) then
local ct = getcatcode(c)
if (ct==11) or (ct==12) then
- local lec = getcount 'ltjlineendcomment'
+ local lec = getcount(cnt_lineend)
-- Is the catcode of \ltjlineendcomment (new comment char) is 14 (comment)?
if ltjc_is_japanese_char_curlist(c) and (getcatcode(lec)==14) then
stop_time_measure 'inputbuf'; return buffer .. utfchar(lec)