From cc3301afa6666b691d076756402932ded79d510c Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 26 Jun 2017 18:19:49 +0200 Subject: =?UTF-8?q?bugfix:=20suk=C5=ABn=20quoting=20in=20'easy'=20rules=20?= =?UTF-8?q?put=20an=20additional=20suk=C5=ABn=20instead=20of=20taking=20it?= =?UTF-8?q?=20out;=20new=20encoding=20of=20bare=20=CA=BEalif=20as=20.A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arabluatex.lua | 10 ++++++++-- arabluatex_fullvoc.lua | 4 ++++ arabluatex_trans.lua | 9 +++++++++ arabluatex_voc.lua | 4 ++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/arabluatex.lua b/arabluatex.lua index 1793564..9252127 100644 --- a/arabluatex.lua +++ b/arabluatex.lua @@ -335,8 +335,14 @@ local function fullvoceasy(str, rules) inside = string.gsub(inside, digraphsfv[i].a, digraphsfv[i].b) end end - for i = 1,#singlefveasy do - inside = string.gsub(inside, singlefveasy[i].a, singlefveasy[i].b) + if rules == "nosukun" then + for i = 1,#singlefveasy do + inside = string.gsub(inside, singlefveasy[i].a, singlefveasy[i].b) + end + else + for i = 1,#singlefv do + inside = string.gsub(inside, singlefv[i].a, singlefv[i].b) + end end for i = 1,#longv do inside = string.gsub(inside, longv[i].a, longv[i].b) diff --git a/arabluatex_fullvoc.lua b/arabluatex_fullvoc.lua index ae4f42a..e1252e5 100644 --- a/arabluatex_fullvoc.lua +++ b/arabluatex_fullvoc.lua @@ -25,6 +25,8 @@ along with this program. If not, see hamzafv = { -- next line for ʾiʿrāb hyphen {a="(')(%-)([uaiUAI])", b="%1%3"}, + -- next line for ʾalif alone + {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -138,6 +140,8 @@ hamzafv = { hamzafveasy = { -- differences marked below with 'easy' -- next line for ʾiʿrāb hyphen {a="(')(%-)([uaiUAI])", b="%1%3"}, + -- next line for ʾalif alone + {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, diff --git a/arabluatex_trans.lua b/arabluatex_trans.lua index 52167e2..ebb8611 100644 --- a/arabluatex_trans.lua +++ b/arabluatex_trans.lua @@ -71,6 +71,9 @@ captr = { -- dmg hamzatrdmg = { + -- next line for ʾalif alone + {a="(%.A)([^uai])", b=".|%2"}, + {a="(%.A)([uai])", b="|%2"}, -- hard coded hamza {a="|\"'", b="ʾ"}, {a="A\"'", b="ʾA"}, @@ -437,6 +440,9 @@ shortvtrdmg = { -- loc hamzatrloc = { + -- next line for ʾalif alone + {a="(%.A)([^uai])", b=".|%2"}, + {a="(%.A)([uai])", b="|%2"}, -- hard coded hamza {a="|\"'", b="ʾ"}, {a="A\"'", b="ʾA"}, @@ -691,6 +697,9 @@ finaltrloc = { -- arabica hamzatrarabica = { -- ≠ from hamzatrloc: initial hamza has to be held + -- next line for ʾalif alone + {a="(%.A)([^uai])", b=".|%2"}, + {a="(%.A)([uai])", b="|%2"}, -- hard coded hamza {a="|\"'", b="ʾ"}, {a="A\"'", b="ʾA"}, diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua index 8f6b9bb..d3e32c3 100644 --- a/arabluatex_voc.lua +++ b/arabluatex_voc.lua @@ -170,6 +170,8 @@ buckwalter = { hamza = { -- next line for ʾiʿrāb hyphen {a="(')(%-)([uaiUAI])", b="%1%3"}, + -- next line for ʾalif alone + {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -274,6 +276,8 @@ hamza = { hamzaeasy = { -- differences marked below with 'easy' -- next line for ʾiʿrāb hyphen {a="(')(%-)([uaiUAI])", b="%1%3"}, + -- next line for ʾalif alone + {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, -- cgit v1.2.3