From 78f24b4133a107fc2e6d780e46468eb1ba173184 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 26 Aug 2018 19:11:05 +0200 Subject: al_closestream(), nested \txarb{}: removed superfluous pair of braces --- arabluatex.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arabluatex.lua b/arabluatex.lua index 5b2d2e3..8fc31bc 100644 --- a/arabluatex.lua +++ b/arabluatex.lua @@ -817,7 +817,10 @@ function al_closestream() t = string.gsub(t, "(\\end%s?)(%b{})", "%1%2\n") t = string.gsub(t, "([^\n]%s-)(\\end)%s?(%b{})", "%1\n%2%3") t = string.gsub(t, "\n\n\n", "\n\n") - t = string.gsub(t, "(\\txarb%s?%{)(\\txarb%s?)(%b{})(%})", "%1%3%4") + t = string.gsub(t, "(\\txarb%s?%{)(\\txarb%s?)(%b{})(%})", function(tagio, tagii, body, tagic) + body = string.sub(body, 2, -2) + return string.format("%s%s%s", tagio, body, tagic) + end) t = string.gsub(t, "(\\prname%s?%*%{)(\\txtrans%s?)(%b{})(%})", function(tagio, tagii, body, tagic) body = string.sub(body, 2, -2) return string.format("%s%s%s", tagio, body, tagic) -- cgit v1.2.3