aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arabluatex.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 3e7dd96..b99fbca 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -81,7 +81,7 @@ local bsqbrackets = lpeg.Cs{ "[" * ((1 - lpeg.S"[]") + lpeg.V(1))^0 * "]" }
81local bcbraces = lpeg.Cs{ "{" * ((1 - lpeg.S"{}") + lpeg.V(1))^0 * "}" } 81local bcbraces = lpeg.Cs{ "{" * ((1 - lpeg.S"{}") + lpeg.V(1))^0 * "}" }
82local spce = lpeg.P(" ") 82local spce = lpeg.P(" ")
83local bsqbracketsii = lpeg.Cs(bsqbrackets^-2) 83local bsqbracketsii = lpeg.Cs(bsqbrackets^-2)
84local bcbracesii = lpeg.Cs(spce^-1 * bcbraces * spce^-1 * bcbraces^-1) 84local bcbracesii = lpeg.Cs(bcbraces * bcbraces^-1)
85 85
86local function breakcmd(str) 86local function breakcmd(str)
87 for i = 1,#albrkcmds do 87 for i = 1,#albrkcmds do
@@ -95,7 +95,7 @@ local function breakcmd(str)
95 str = gsub(str, dblbkslash * lpeg.Cs(brkcmds[i]) * spce^-1 * bsqbracketsii * bcbracesii, "}%1%2%3%4\\arb{") 95 str = gsub(str, dblbkslash * lpeg.Cs(brkcmds[i]) * spce^-1 * bsqbracketsii * bcbracesii, "}%1%2%3%4\\arb{")
96 end 96 end
97 end 97 end
98 -- process \item[], then \item[] 98 -- process \item[], then \item
99 str = string.gsub(str, "\\(item.?)(%b[])", 99 str = string.gsub(str, "\\(item.?)(%b[])",
100 function(tag, body) 100 function(tag, body)
101 body = string.sub(body, 2, -2) 101 body = string.sub(body, 2, -2)