aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2022-10-24 09:12:13 +0200
committerRobert Alessi <alessi@robertalessi.net>2022-10-24 09:12:13 +0200
commit7e40727a39b76d13a2f0e795b1d1f4be1855f670 (patch)
tree6644ad9695373d82e6b549d7ac0f0b8e002659e5
parent01f312f47ae11dd1a00903abf783a4e4514a959d (diff)
downloadarabluatex-7e40727a39b76d13a2f0e795b1d1f4be1855f670.tar.gz
\par needs to be processed separately
-rw-r--r--arabluatex.lua4
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)
54local rawcmd = lpeg.Cs(dblbkslash * ascii^1) 54local rawcmd = lpeg.Cs(dblbkslash * ascii^1)
55local aftercmd = lpeg.Cs(lpeg.S("*[{,.?;:'`\"") + dblbkslash) 55local aftercmd = lpeg.Cs(lpeg.S("*[{,.?;:'`\"") + dblbkslash)
56local cmdargs = lpeg.Cs(spce^-1 * bsqbracketsii * bcbracesii * bsqbrackets^-1) 56local cmdargs = lpeg.Cs(spce^-1 * bsqbracketsii * bcbracesii * bsqbrackets^-1)
57local cmdargsnobs = lpeg.Cs(spce^-1 * bcbracesii)
57local arbargs = lpeg.Cs(spce^-1 * bsqbrackets^-1 * bcbraces) 58local arbargs = lpeg.Cs(spce^-1 * bsqbrackets^-1 * bcbraces)
58local baytargs = lpeg.Cs(spce * bcbraces * bsqbrackets^-1 * bcbraces) 59local baytargs = lpeg.Cs(spce * bcbraces * bsqbrackets^-1 * bcbraces)
59local arind = lpeg.Cs(dblbkslash * lpeg.P("arind") * spce^-1 * bsqbracketsii) 60local arind = lpeg.Cs(dblbkslash * lpeg.P("arind") * spce^-1 * bsqbracketsii)
@@ -90,7 +91,6 @@ local outofarb = {
90local albrkcmds = { 91local 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)
121end 121end
122 122
123local function breakcmd(str) 123local 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)