aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2018-10-04 10:51:34 +0200
committerRobert Alessi <alessi@robertalessi.net>2018-10-04 10:51:34 +0200
commit1705ab2310e9b980a96fe325da44e923b474a167 (patch)
tree9cfd8fb43b198f48f382bd4476f266a77e66dd70
parente040b766b62c0e8cda0c2a89dab3de7b1de7efdc (diff)
downloadarabluatex-1705ab2310e9b980a96fe325da44e923b474a167.tar.gz
prevent shorter arbmark ids from being taken as replacement patterns
-rw-r--r--arabluatex.lua2
-rw-r--r--arabluatex_voc.lua8
2 files changed, 6 insertions, 4 deletions
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)
997end 997end
998 998
999function newarbmark(abbr, rtlmk, ltrmk) 999function newarbmark(abbr, rtlmk, ltrmk)
1000 abbr = "@"..abbr
1000 rtlmk = "\\arabicfont{}"..rtlmk 1001 rtlmk = "\\arabicfont{}"..rtlmk
1001 table.insert(arbmarks, {a = abbr, b = rtlmk, c = ltrmk}) 1002 table.insert(arbmarks, {a = abbr, b = rtlmk, c = ltrmk})
1002 table.sort(arbmarks, function(a ,b) return(#a.a > #b.a) end) 1003 table.sort(arbmarks, function(a ,b) return(#a.a > #b.a) end)
@@ -1013,6 +1014,7 @@ local function isintable(table, element)
1013end 1014end
1014 1015
1015function processarbmarks(str, dir) 1016function processarbmarks(str, dir)
1017 str = "@"..str
1016 if not isintable(arbmarks, str) then 1018 if not isintable(arbmarks, str) then
1017 str = "\\LR{<??>}"..atletter.."\\al@wrong@mark{}"..atother 1019 str = "\\LR{<??>}"..atletter.."\\al@wrong@mark{}"..atother
1018 else 1020 else
diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua
index 842f42b..c70e055 100644
--- a/arabluatex_voc.lua
+++ b/arabluatex_voc.lua
@@ -23,10 +23,10 @@ along with this program. If not, see
23--]] 23--]]
24 24
25arbmarks = { 25arbmarks = {
26 {a="bismillah", b="\\arabicfont{}^^^^fdfd", c="\\arb[trans]{bi-ismi \\uc{'l-l_ahi} 'l-ra.hm_ani 'l-ra.hImi}"}, 26 {a="@bismillah", b="\\arabicfont{}^^^^fdfd", c="\\arb[trans]{bi-ismi \\uc{'l-l_ahi} 'l-ra.hm_ani 'l-ra.hImi}"},
27 {a="salam", b="\\arabicfont{}^^^^fdf5", c="\\arb[trans]{.sall_A\\arbnull{'l-l_ahu} \\uc{'l-l_ahu} `alay-hi wa-sallama}"}, 27 {a="@salam", b="\\arabicfont{}^^^^fdf5", c="\\arb[trans]{.sall_A\\arbnull{'l-l_ahu} \\uc{'l-l_ahu} `alay-hi wa-sallama}"},
28 {a="jalla", b="\\arabicfont{}^^^^fdfb", c="\\arb[trans]{^galla ^galAla-hu}"}, 28 {a="@jalla", b="\\arabicfont{}^^^^fdfb", c="\\arb[trans]{^galla ^galAla-hu}"},
29 {a="slm", b="\\arabicfont{}^^^^fdfa", c="\\arb[trans]{.sall_A\\arbnull{'l-l_ahu} \\uc{'l-l_ahu} `alay-hi wa-sallama}"} 29 {a="@slm", b="\\arabicfont{}^^^^fdfa", c="\\arb[trans]{.sall_A\\arbnull{'l-l_ahu} \\uc{'l-l_ahu} `alay-hi wa-sallama}"}
30} 30}
31 31
32abjad = { 32abjad = {