diff options
-rw-r--r-- | arabluatex.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arabluatex.lua b/arabluatex.lua index f639770..799fed9 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -54,6 +54,7 @@ local cmd = lpeg.Cs(dblbkslash * ascii^1 * cmdstar^-1) | |||
54 | local rawcmd = lpeg.Cs(dblbkslash * ascii^1) | 54 | local rawcmd = lpeg.Cs(dblbkslash * ascii^1) |
55 | local aftercmd = lpeg.Cs(lpeg.S("*[{,.?;:'`\"") + dblbkslash) | 55 | local aftercmd = lpeg.Cs(lpeg.S("*[{,.?;:'`\"") + dblbkslash) |
56 | local cmdargs = lpeg.Cs(spce^-1 * bsqbracketsii * bcbracesii * bsqbrackets^-1) | 56 | local cmdargs = lpeg.Cs(spce^-1 * bsqbracketsii * bcbracesii * bsqbrackets^-1) |
57 | local cmdargsnobs = lpeg.Cs(spce^-1 * bcbracesii) | ||
57 | local arbargs = lpeg.Cs(spce^-1 * bsqbrackets^-1 * bcbraces) | 58 | local arbargs = lpeg.Cs(spce^-1 * bsqbrackets^-1 * bcbraces) |
58 | local baytargs = lpeg.Cs(spce * bcbraces * bsqbrackets^-1 * bcbraces) | 59 | local baytargs = lpeg.Cs(spce * bcbraces * bsqbrackets^-1 * bcbraces) |
59 | local arind = lpeg.Cs(dblbkslash * lpeg.P("arind") * spce^-1 * bsqbracketsii) | 60 | local arind = lpeg.Cs(dblbkslash * lpeg.P("arind") * spce^-1 * bsqbracketsii) |
@@ -90,7 +91,6 @@ local outofarb = { | |||
90 | local albrkcmds = { | 91 | local albrkcmds = { |
91 | "begin", | 92 | "begin", |
92 | "end", | 93 | "end", |
93 | "par", | ||
94 | "LRmarginpar", | 94 | "LRmarginpar", |
95 | "arbmark", | 95 | "arbmark", |
96 | "abjad", | 96 | "abjad", |
@@ -121,6 +121,8 @@ function arabluatex.mkarbbreak(str, opt) | |||
121 | end | 121 | end |
122 | 122 | ||
123 | local function breakcmd(str) | 123 | local function breakcmd(str) |
124 | -- \par | ||
125 | str = gsub(str, dblbkslash * lpeg.Cs("par") * cmdargsnobs, "\\al@brk{%1%2%3}") | ||
124 | -- process \item[], then \item[] | 126 | -- process \item[], then \item[] |
125 | str = string.gsub(str, "\\(item.?)(%b[])", | 127 | str = string.gsub(str, "\\(item.?)(%b[])", |
126 | function(tag, body) | 128 | function(tag, body) |