diff options
Diffstat (limited to 'arabluatex.lua')
-rw-r--r-- | arabluatex.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arabluatex.lua b/arabluatex.lua index 8fc04d6..5b2d2e3 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -817,7 +817,11 @@ function al_closestream() | |||
817 | t = string.gsub(t, "(\\end%s?)(%b{})", "%1%2\n") | 817 | t = string.gsub(t, "(\\end%s?)(%b{})", "%1%2\n") |
818 | t = string.gsub(t, "([^\n]%s-)(\\end)%s?(%b{})", "%1\n%2%3") | 818 | t = string.gsub(t, "([^\n]%s-)(\\end)%s?(%b{})", "%1\n%2%3") |
819 | t = string.gsub(t, "\n\n\n", "\n\n") | 819 | t = string.gsub(t, "\n\n\n", "\n\n") |
820 | t = string.gsub(t, "(\\txarb%s?%{)(\\txarb%s?%b{})(%})", "%2") | 820 | t = string.gsub(t, "(\\txarb%s?%{)(\\txarb%s?)(%b{})(%})", "%1%3%4") |
821 | t = string.gsub(t, "(\\prname%s?%*%{)(\\txtrans%s?)(%b{})(%})", function(tagio, tagii, body, tagic) | ||
822 | body = string.sub(body, 2, -2) | ||
823 | return string.format("%s%s%s", tagio, body, tagic) | ||
824 | end) | ||
821 | if string.find(t, "\\begin%s?{document}.-\\arb%s?[%[%{]") or | 825 | if string.find(t, "\\begin%s?{document}.-\\arb%s?[%[%{]") or |
822 | string.find(t, "\\begin%s?{document}.-\\[Uu]c%s?%b{}") | 826 | string.find(t, "\\begin%s?{document}.-\\[Uu]c%s?%b{}") |
823 | then | 827 | then |