charlesLoder/hebrew-transliteration

Waw + Holem Sequence incorrect

Closed this issue · 1 comments

v.1.1.2 introduced an issue where:

  • בוֹ (bet + waw + holem) > bwo instead of

Problem strongly likely at:

// src/testEach.js 
// line 41

// Tests for waw as a holem-mater
if (/wō(?!ǝ|ĕ|ă|ŏ|i|ē|e|a|ā|u|9)/.test(element)) {
   if (//.test(element)) {
            element = changeElementSplit(element, /wō(?!ǝ|ĕ|ă|ŏ|i|ē|e|a|ā|u|9)/, 'ô');
            // this is a workaround for lack of lookbehind support
            let rev = [...element].reverse().reduce((a, c) => a + c);
            if (/ōw(?!ǝ|ĕ|ă|ŏ|i|ē|e|a|ā|u|9)/.test(rev)) {
                element = changeElementSplit(element, //, 'ô');   
            }
}

Need to make more robust tests.

Without dagesh - בוֹ (bet + waw + holem) - is correct as
With dagesh - בּוֹ (bet + dagesh + waw + holem) - is incorrect as bwō
But with dagesh as - בּוֹ (bet + dagesh + holem + waw) - is correct as