aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex.lua')
-rw-r--r--arabluatex.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 527be3b..294e75f 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -128,6 +128,11 @@ local function indnum(str)
128 return str 128 return str
129end 129end
130 130
131local function processdiscretionary(str)
132 str = string.gsub(str, "\\%-", "\\-{}")
133 return str
134end
135
131local function processarbnull(str, scheme) 136local function processarbnull(str, scheme)
132 if scheme == "buckwalter" then 137 if scheme == "buckwalter" then
133 str = string.gsub(str, "(\\arbnull.?)(%b{})", function(tag, body) 138 str = string.gsub(str, "(\\arbnull.?)(%b{})", function(tag, body)
@@ -558,6 +563,7 @@ end
558 563
559function processtrans(str, mode, rules, scheme) 564function processtrans(str, mode, rules, scheme)
560 str = "\\arb{".. str.."}" 565 str = "\\arb{".. str.."}"
566 str = processdiscretionary(str)
561 str = processarbnull(str, scheme) 567 str = processarbnull(str, scheme)
562 str = takeoutabjad(str) 568 str = takeoutabjad(str)
563 str = protectarb(str) 569 str = protectarb(str)