aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex.lua')
-rw-r--r--arabluatex.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index a720ed8..1984d6c 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -670,42 +670,42 @@ function cap(str)
670 body = string.sub(body, 2, -2) 670 body = string.sub(body, 2, -2)
671 return string.format("%s", body) 671 return string.format("%s", body)
672 end) 672 end)
673 str = string.gsub(str, "(%s)(bn)", "%1{%2}") 673 str = string.gsub(str, "(%s[%(%<%[]?)(bn)", "%1{%2}")
674 for i = 1,#lcuc do 674 for i = 1,#lcuc do
675 str = string.gsub(str, "^([%S]-%-[`']?)"..lcuc[i].a, "{%1"..lcuc[i].b.."}") 675 str = string.gsub(str, "^([%S]-%-[`']?)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
676 end 676 end
677 for i = 1,#lcuc do 677 for i = 1,#lcuc do
678 str = string.gsub(str, "(%s)([%S]-%-[`']?)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}") 678 str = string.gsub(str, "(%s[%(%<%[]?)([%S]-%-[`']?)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
679 end 679 end
680 for i = 1,#lcuc do 680 for i = 1,#lcuc do
681 str = string.gsub(str, "^([%S]-%-ʿ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}") 681 str = string.gsub(str, "^([%S]-%-ʿ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
682 end 682 end
683 for i = 1,#lcuc do 683 for i = 1,#lcuc do
684 str = string.gsub(str, "(%s)([%S]-%-ʿ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}") 684 str = string.gsub(str, "(%s[%(%<%[]?)([%S]-%-ʿ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
685 end 685 end
686 for i = 1,#lcuc do 686 for i = 1,#lcuc do
687 str = string.gsub(str, "^([%S]-%-ʾ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}") 687 str = string.gsub(str, "^([%S]-%-ʾ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
688 end 688 end
689 for i = 1,#lcuc do 689 for i = 1,#lcuc do
690 str = string.gsub(str, "(%s)([%S]-%-ʾ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}") 690 str = string.gsub(str, "(%s[%(%<%[]?)([%S]-%-ʾ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
691 end 691 end
692 for i = 1,#lcuc do 692 for i = 1,#lcuc do
693 str = string.gsub(str, "^(ʾ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}") 693 str = string.gsub(str, "^(ʾ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
694 end 694 end
695 for i = 1,#lcuc do 695 for i = 1,#lcuc do
696 str = string.gsub(str, "(%s)(ʾ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}") 696 str = string.gsub(str, "(%s[%(%<%[]?)(ʾ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
697 end 697 end
698 for i = 1,#lcuc do 698 for i = 1,#lcuc do
699 str = string.gsub(str, "^(ʿ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}") 699 str = string.gsub(str, "^(ʿ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
700 end 700 end
701 for i = 1,#lcuc do 701 for i = 1,#lcuc do
702 str = string.gsub(str, "(%s)(ʿ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}") 702 str = string.gsub(str, "(%s[%(%<%[]?)(ʿ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
703 end 703 end
704 for i = 1,#lcuc do 704 for i = 1,#lcuc do
705 str = string.gsub(str, "^"..lcuc[i].a, lcuc[i].b) 705 str = string.gsub(str, "^"..lcuc[i].a, lcuc[i].b)
706 end 706 end
707 for i = 1,#lcuc do 707 for i = 1,#lcuc do
708 str = string.gsub(str, "(%s)"..lcuc[i].a, "%1"..lcuc[i].b) 708 str = string.gsub(str, "(%s[%(%<%[]?)"..lcuc[i].a, "%1"..lcuc[i].b)
709 end 709 end
710 return "\\txtrans{"..str.."}" 710 return "\\txtrans{"..str.."}"
711end 711end