charlesLoder/hebrew-transliteration

Update furtive patach regex

charlesLoder opened this issue · 0 comments

The furtive patach regex needs to be updated with an optional check for a sof pasuq character. E.g. appending (\u{05C3})

if (syl.isFinal && !syl.isClosed) {
const furtiveChet = /\u{05D7}\u{05B7}$/mu;
if (furtiveChet.test(clusterText)) {
return replaceWithRegex(clusterText, furtiveChet, "\u{05B7}\u{05D7}");
}
const furtiveAyin = /\u{05E2}\u{05B7}$/mu;
if (furtiveAyin.test(clusterText)) {
return replaceWithRegex(clusterText, furtiveAyin, "\u{05B7}\u{05E2}");
}
const furtiveHe = /\u{05D4}\u{05BC}\u{05B7}$/mu;
if (furtiveHe.test(clusterText)) {
return replaceWithRegex(clusterText, furtiveHe, "\u{05B7}\u{05D4}\u{05BC}");
}
}