summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-21 21:08:21 +0000
committerKarl Berry <karl@freefriends.org>2021-05-21 21:08:21 +0000
commit59d0218f96260081a783b6924cf577e07a7c486d (patch)
treec550fb63acf79b9e618fd08862b56a0009dc59df /Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua
parente0843bcbd8aca384ac293fa563b5133a037f45be (diff)
luatexja (21may21)
git-svn-id: svn://tug.org/texlive/trunk@59299 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua
index 6423f8817a5..e1623199e4f 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-inputbuf.lua
@@ -5,7 +5,6 @@
luatexja.load_module 'base'; local ltjb = luatexja.base
luatexja.load_module 'charrange'; local ltjc = luatexja.charrange
-require "unicode"
local utflen = utf.len
local utfbyte = utf.byte
local utfchar = utf.char
@@ -24,12 +23,11 @@ local start_time_measure, stop_time_measure
local function add_comment(buffer)
start_time_measure 'inputbuf'
local i = utflen(buffer)
- while (i>0) and (getcatcode(utfbyte(buffer, i))==1
- or getcatcode(utfbyte(buffer, i))==2) do
- i=i-1
+ local c = utfbyte(buffer, i)
+ while (i>0) and (getcatcode(c)==1 or getcatcode(c)==2) do
+ i=i-1; if (i>0) then c = utfbyte(buffer, i) end;
end
if i>0 then
- local c = utfbyte(buffer, i)
if c>=0x80 then
local te = tex.endlinechar
-- Is the catcode of endline character is 5 (end-of-line)?