From 1705ab2310e9b980a96fe325da44e923b474a167 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Thu, 4 Oct 2018 10:51:34 +0200 Subject: prevent shorter arbmark ids from being taken as replacement patterns --- arabluatex.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arabluatex.lua') diff --git a/arabluatex.lua b/arabluatex.lua index 6e40efd..862b8ae 100644 --- a/arabluatex.lua +++ b/arabluatex.lua @@ -997,6 +997,7 @@ function processtrans(str, mode, rules, scheme) end function newarbmark(abbr, rtlmk, ltrmk) + abbr = "@"..abbr rtlmk = "\\arabicfont{}"..rtlmk table.insert(arbmarks, {a = abbr, b = rtlmk, c = ltrmk}) table.sort(arbmarks, function(a ,b) return(#a.a > #b.a) end) @@ -1013,6 +1014,7 @@ local function isintable(table, element) end function processarbmarks(str, dir) + str = "@"..str if not isintable(arbmarks, str) then str = "\\LR{}"..atletter.."\\al@wrong@mark{}"..atother else -- cgit v1.2.3