aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex.lua')
-rw-r--r--arabluatex.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 5449689..37e941e 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -1054,6 +1054,9 @@ function uc(str)
1054 body = string.sub(body, 2, -2) 1054 body = string.sub(body, 2, -2)
1055 return string.format("%s", body) 1055 return string.format("%s", body)
1056 end) 1056 end)
1057 str = string.gsub(str, "{", "\\@al@ob")
1058 str = string.gsub(str, "} ", "\\@al@cb@sp ")
1059 str = string.gsub(str, "}", "\\@al@cb")
1057 -- Allah and ibn 1060 -- Allah and ibn
1058 str = string.gsub(str, "(al%-lāh)([uai]?)", "{Allāh%2}") 1061 str = string.gsub(str, "(al%-lāh)([uai]?)", "{Allāh%2}")
1059 str = string.gsub(str, "([%'%-]?)(l%-lāh)([uai]?)", "%1{Llāh%3}") 1062 str = string.gsub(str, "([%'%-]?)(l%-lāh)([uai]?)", "%1{Llāh%3}")
@@ -1100,10 +1103,11 @@ function uc(str)
1100 for i = 1,#lcuc do 1103 for i = 1,#lcuc do
1101 str = string.gsub(str, "(%s[%(%<%[]?)"..lcuc[i].a, "%1"..lcuc[i].b) 1104 str = string.gsub(str, "(%s[%(%<%[]?)"..lcuc[i].a, "%1"..lcuc[i].b)
1102 end 1105 end
1103 str = gsub(str, -cmd * bcbraces, function(body) 1106 str = string.gsub(str, "{", "")
1104 body = string.sub(body, 2, -2) 1107 str = string.gsub(str, "}", "")
1105 return string.format("%s", body) 1108 str = string.gsub(str, "\\@al@ob", "{")
1106 end) 1109 str = string.gsub(str, "\\@al@cb@sp ", "} ")
1110 str = string.gsub(str, "\\@al@cb", "}")
1107 if export_utf == "yes" then 1111 if export_utf == "yes" then
1108 tofile = str 1112 tofile = str
1109 tooutfile(tofile) 1113 tooutfile(tofile)