From f71307c441f923e722f5ce7f1019899763690e4b Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 10 Feb 2019 18:08:51 +0100 Subject: improved preceding commit [01e4e7d] --- arabluatex.lua | 12 ++++++++---- 1 file 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) body = string.sub(body, 2, -2) return string.format("%s", body) end) + str = string.gsub(str, "{", "\\@al@ob") + str = string.gsub(str, "} ", "\\@al@cb@sp ") + str = string.gsub(str, "}", "\\@al@cb") -- Allah and ibn str = string.gsub(str, "(al%-lāh)([uai]?)", "{Allāh%2}") str = string.gsub(str, "([%'%-]?)(l%-lāh)([uai]?)", "%1{Llāh%3}") @@ -1100,10 +1103,11 @@ function uc(str) for i = 1,#lcuc do str = string.gsub(str, "(%s[%(%<%[]?)"..lcuc[i].a, "%1"..lcuc[i].b) end - str = gsub(str, -cmd * bcbraces, function(body) - body = string.sub(body, 2, -2) - return string.format("%s", body) - end) + str = string.gsub(str, "{", "") + str = string.gsub(str, "}", "") + str = string.gsub(str, "\\@al@ob", "{") + str = string.gsub(str, "\\@al@cb@sp ", "} ") + str = string.gsub(str, "\\@al@cb", "}") if export_utf == "yes" then tofile = str tooutfile(tofile) -- cgit v1.2.3