aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex.lua')
-rw-r--r--arabluatex.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 9252127..3a405a2 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -27,6 +27,13 @@ require("arabluatex_fullvoc")
27require("arabluatex_novoc") 27require("arabluatex_novoc")
28require("arabluatex_trans") 28require("arabluatex_trans")
29 29
30function isintable(table, value)
31 for _, v in pairs(table) do
32 if v == value then return true end
33 end
34 return false
35end
36
30local function protectarb(str) 37local function protectarb(str)
31 str = string.gsub(str, "(\\arb.?)(%[.-%])(%b{})", "\\@arb%2%3") 38 str = string.gsub(str, "(\\arb.?)(%[.-%])(%b{})", "\\@arb%2%3")
32 str = string.gsub(str, "(\\begin.?)(%b{})(%b[])", "\\@begin%3%2") 39 str = string.gsub(str, "(\\begin.?)(%b{})(%b[])", "\\@begin%3%2")
@@ -46,6 +53,8 @@ local function unprotectarb(str)
46return str 53return str
47end 54end
48 55
56breakcmds = {}
57
49local function breakcmd(str) 58local function breakcmd(str)
50 -- process \item[], then \item[] 59 -- process \item[], then \item[]
51 str = string.gsub(str, "\\(item.?)(%b[])", 60 str = string.gsub(str, "\\(item.?)(%b[])",