aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-07-06 15:05:21 +0200
committerRobert Alessi <alessi@robertalessi.net>2016-07-06 15:05:21 +0200
commita4c414bd2688047f512f5818e079468fb1c5b5ce (patch)
treebbce2fb3698f83ebf8d801ca8df05f4270d8e096
parentc81e964d4b9ebea5776e35c52cf626b861046483 (diff)
downloadarabluatex-a4c414bd2688047f512f5818e079468fb1c5b5ce.tar.gz
adapted \cap to accept the local hyphenation command \-
-rw-r--r--arabluatex.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index 435fe83..4c2fac5 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -549,11 +549,11 @@ function cap(str)
549 body = string.sub(body, 2, -2) 549 body = string.sub(body, 2, -2)
550 return string.format("%s", body) 550 return string.format("%s", body)
551 end) 551 end)
552 if string.find(str, "%-['`ʾʿ]") then 552 if string.find(str, "[^\\]%-['`ʾʿ]") then
553 str = string.gsub(str, "(%-['`])", "%1\\MakeUppercase ") 553 str = string.gsub(str, "(%-['`])", "%1\\MakeUppercase ")
554 str = string.gsub(str, "(%-ʿ)", "%1\\MakeUppercase ") 554 str = string.gsub(str, "(%-ʿ)", "%1\\MakeUppercase ")
555 str = string.gsub(str, "(%-ʾ)", "%1\\MakeUppercase ") 555 str = string.gsub(str, "(%-ʾ)", "%1\\MakeUppercase ")
556 elseif string.find(str, "%-[^'`ʾʿ]") then 556 elseif string.find(str, "[^\\]%-[^'`ʾʿ]") then
557 str = string.gsub(str, "(%-)", "%1\\MakeUppercase ") 557 str = string.gsub(str, "(%-)", "%1\\MakeUppercase ")
558 elseif string.find(str, "^['`ʾʿ]") then 558 elseif string.find(str, "^['`ʾʿ]") then
559 str = string.gsub(str, "^(['`])", "%1\\MakeUppercase ") 559 str = string.gsub(str, "^(['`])", "%1\\MakeUppercase ")