Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Supporting semi-vowel i in the beginning of the word.

  • Loading branch information...
commit d5dc92aad92feed0381b201dc28d6b6f4786dc94 1 parent ef3bfe9
@amire80 amire80 authored
Showing with 21 additions and 4 deletions.
  1. +5 −3 lib/Lingua/IT/Ita2heb.pm
  2. +16 −1 t/08-i.t
View
8 lib/Lingua/IT/Ita2heb.pm
@@ -175,8 +175,9 @@ sub ita_to_heb { ## no critic (Subroutines::ProhibitExcessComplexity)
$ita_letter ~~ @ALL_LATIN_VOWELS
and ($seq->at_start or $seq->wrote_vowel)
and not ( $ita_letter ~~ @TYPES_OF_I
- and $seq->match_before([\@ALL_LATIN_VOWELS])
- and $seq->match_after([\@ALL_LATIN_VOWELS]))
+ and $seq->match_after([\@ALL_LATIN_VOWELS])
+ and ( $seq->match_before([\@ALL_LATIN_VOWELS])
+ or $seq->at_start))
)
{
$heb .= $ALEF;
@@ -284,7 +285,8 @@ sub ita_to_heb { ## no critic (Subroutines::ProhibitExcessComplexity)
}
elsif ($seq->match_after([\@ALL_LATIN_VOWELS]))
{
- if ($seq->match_before([\@ALL_LATIN_VOWELS])) {
+ if ( $seq->at_start
+ or $seq->match_before([\@ALL_LATIN_VOWELS])) {
$hebrew_to_add .= $YOD;
}
else {
View
17 t/08-i.t
@@ -4,7 +4,7 @@ use 5.010;
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 3;
use charnames ':full';
use lib './t/lib';
@@ -45,3 +45,18 @@ check_ita_tr(
. "\N{HEBREW LETTER HE}",
'Gioiosa',
);
+
+# TEST
+check_ita_tr(
+ ['Ionica'],
+ "\N{HEBREW LETTER YOD}"
+ . "\N{HEBREW LETTER VAV}"
+ . "\N{HEBREW POINT HOLAM}"
+ . "\N{HEBREW LETTER NUN}"
+ . "\N{HEBREW POINT HIRIQ}"
+ . "\N{HEBREW LETTER YOD}"
+ . "\N{HEBREW LETTER QOF}"
+ . "\N{HEBREW POINT QAMATS}"
+ . "\N{HEBREW LETTER HE}",
+ 'Ionica',
+);
Please sign in to comment.
Something went wrong with that request. Please try again.