• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ソースコードの管理場所


Commit MetaInfo

Revisão125ec15e1370a398edd071678330f47d1679535d (tree)
Hora2016-03-08 13:12:51
AutorKazuki Maeda <kmaeda@kmae...>
CommiterKazuki Maeda

Mensagem de Log

ltj-inputbuf.lua: comment_string

Mudança Sumário

Diff

--- a/src/ltj-inputbuf.lua
+++ b/src/ltj-inputbuf.lua
@@ -6,6 +6,8 @@ luatexja.load_module('base'); local ltjb = luatexja.base
66 luatexja.load_module('charrange'); local ltjc = luatexja.charrange
77
88 require("unicode")
9+luatexja.inputbuf = luatexja.inputbuf or {}
10+local ltji = luatexja.inputbuf
911 local utflen = unicode.utf8.len
1012 local utfbyte = unicode.utf8.byte
1113 local utfchar = unicode.utf8.char
@@ -33,12 +35,18 @@ local function add_comment(buffer)
3335 if c>=0x80 then
3436 local ct = getcatcode(c)
3537 local te = tex.endlinechar
36- local ctl = (te ~= -1) and (getcatcode(te)==5) and (getcatcode(getcount('ltjlineendcomment'))==14)
37- -- Is the catcode of endline character is 5 (end-of-line)?
38+ local ctl = (te ~= -1) and (getcatcode(te)==5)
39+ -- Is the catcode of endline character is 5 (end-of-line)?
40+ local cc = (getcount('ltjlineendcomment') >= 0) and (getcatcode(getcount('ltjlineendcomment'))==14)
3841 -- Is the catcode of \ltjlineendcomment (new comment char) is 14 (comment)?
39- if ((ct==11) or (ct==12)) and ctl then
42+ local cs = (getcount('ltjlineendcomment') == -2 and luatexja.inputbuf.comment_string)
43+ if ((ct==11) or (ct==12)) and ctl and (cc or cs) then
4044 if ltjc_is_japanese_char_curlist(c) then
41- buffer = buffer .. utfchar(getcount('ltjlineendcomment'))
45+ if cs then
46+ buffer = buffer .. luatexja.inputbuf.comment_string
47+ else
48+ buffer = buffer .. utfchar(getcount('ltjlineendcomment'))
49+ end
4250 end
4351 end
4452 end