diff options
author | Robert Alessi <alessi@robertalessi.net> | 2016-03-11 10:52:58 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2016-03-11 10:52:58 +0100 |
commit | 3a73854f60e370860c14ae8ac0c21de6f845b978 (patch) | |
tree | 09403485ad0f27e59425c6b6383abf2789c37bd3 | |
parent | 35afa7777cc57f95cd160f8349b72890f578f4ec (diff) | |
download | arabluatex-3a73854f60e370860c14ae8ac0c21de6f845b978.tar.gz |
bugfix: quoting sukūn in fullvoc mode
-rw-r--r-- | arabluatex.lua | 4 | ||||
-rw-r--r-- | arabluatex_fullvoc.lua | 32 | ||||
-rw-r--r-- | arabluatex_voc.lua | 6 |
3 files changed, 35 insertions, 7 deletions
diff --git a/arabluatex.lua b/arabluatex.lua index 158282d..8ebc30b 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -174,8 +174,8 @@ local function fullvoc(str) | |||
174 | for i = 1,#digraphsfv do | 174 | for i = 1,#digraphsfv do |
175 | inside = string.gsub(inside, digraphsfv[i].a, digraphsfv[i].b) | 175 | inside = string.gsub(inside, digraphsfv[i].a, digraphsfv[i].b) |
176 | end | 176 | end |
177 | for i = 1,#single do | 177 | for i = 1,#singlefv do |
178 | inside = string.gsub(inside, single[i].a, single[i].b) | 178 | inside = string.gsub(inside, singlefv[i].a, singlefv[i].b) |
179 | end | 179 | end |
180 | for i = 1,#longv do | 180 | for i = 1,#longv do |
181 | inside = string.gsub(inside, longv[i].a, longv[i].b) | 181 | inside = string.gsub(inside, longv[i].a, longv[i].b) |
diff --git a/arabluatex_fullvoc.lua b/arabluatex_fullvoc.lua index 8fb564e..021d75a 100644 --- a/arabluatex_fullvoc.lua +++ b/arabluatex_fullvoc.lua | |||
@@ -173,10 +173,10 @@ digraphsfv = { | |||
173 | {a="ww", b="وّ"}, | 173 | {a="ww", b="وّ"}, |
174 | {a="yy", b="يّ"}, | 174 | {a="yy", b="يّ"}, |
175 | -- sukūn begin | 175 | -- sukūn begin |
176 | {a="\"", b=""}, | ||
177 | {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])$", b="%1ْ"}, | 176 | {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])$", b="%1ْ"}, |
178 | {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])([%s])", b="%1ْ%2"}, | 177 | {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])([%s])", b="%1ْ%2"}, |
179 | {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])([^%_uaiUAIًٌٍ])", b="%1ْ%2"}, | 178 | {a="([%_%^%.]?[btjghxdrzs%`fqklmnwy])([%_]?[^uaiUAIًٌٍ])", b="%1ْ%2"}, |
179 | {a="ْ\"", b="\""}, | ||
180 | -- sukūn end | 180 | -- sukūn end |
181 | {a="_t", b="ث"}, | 181 | {a="_t", b="ث"}, |
182 | {a="%^g", b="ج"}, | 182 | {a="%^g", b="ج"}, |
@@ -201,3 +201,31 @@ digraphsfv = { | |||
201 | {a="%.k", b="ک"}, | 201 | {a="%.k", b="ک"}, |
202 | {a="%.n", b="ں"}, | 202 | {a="%.n", b="ں"}, |
203 | } | 203 | } |
204 | |||
205 | singlefv = { | ||
206 | {a="b", b="ب"}, | ||
207 | {a="t", b="ت"}, | ||
208 | {a="j", b="ج"}, | ||
209 | {a="x", b="خ"}, | ||
210 | {a="d", b="د"}, | ||
211 | {a="r", b="ر"}, | ||
212 | {a="z", b="ز"}, | ||
213 | {a="s", b="س"}, | ||
214 | {a="f", b="ف"}, | ||
215 | {a="`", b="ع"}, | ||
216 | {a="f", b="ف"}, | ||
217 | {a="q", b="ق"}, | ||
218 | {a="k", b="ك"}, | ||
219 | {a="l", b="ل"}, | ||
220 | {a="m", b="م"}, | ||
221 | {a="n", b="ن"}, | ||
222 | {a="h", b="ه"}, | ||
223 | {a="w", b="و"}, | ||
224 | {a="y", b="ي"}, | ||
225 | {a="T", b="ة"}, | ||
226 | {a="\"$", b=""}, | ||
227 | {a="\"(%W)", b="%1"}, | ||
228 | {a="\"([^uaiUAI])", b="%1"}, | ||
229 | {a="([^0-9])%-([^0-9])", b="%1%2"}, | ||
230 | {a="B", b="ـ"}, | ||
231 | } | ||
diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua index 25d46bb..268495f 100644 --- a/arabluatex_voc.lua +++ b/arabluatex_voc.lua | |||
@@ -284,9 +284,9 @@ longv = { | |||
284 | } | 284 | } |
285 | 285 | ||
286 | shortv = { | 286 | shortv = { |
287 | {a="\"u", b="ُ"}, | 287 | {a="\"u", b=""}, |
288 | {a="\"a", b="َ"}, | 288 | {a="\"a", b=""}, |
289 | {a="\"i", b="ِ"}, | 289 | {a="\"i", b=""}, |
290 | {a="u", b="ُ"}, | 290 | {a="u", b="ُ"}, |
291 | {a="a", b="َ"}, | 291 | {a="a", b="َ"}, |
292 | {a="i", b="ِ"} | 292 | {a="i", b="ِ"} |