From 0234b2bf55f68697f05d2c9e5a9758a884a28635 Mon Sep 17 00:00:00 2001 From: "Bhajneet S.K" Date: Mon, 17 Feb 2020 20:01:24 -0500 Subject: [PATCH] feat: simplify transliteration of multiple vowel sounds close #123 --- lib/toEnglish.js | 1 + test/toEnglish.spec.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/toEnglish.js b/lib/toEnglish.js index dd69000..a345b0e 100644 --- a/lib/toEnglish.js +++ b/lib/toEnglish.js @@ -199,6 +199,7 @@ const finalReplacements = Object.entries( { nn: 'n', eeaa: 'eea', eiaa: 'eaa', + eio: 'eo', anm: 'am', [ `ahi${spaceCharsRegex}` ]: 'eh$1', [ `yhi${spaceCharsRegex}` ]: 'yeh$1', diff --git a/test/toEnglish.spec.js b/test/toEnglish.spec.js index e79866f..004397f 100644 --- a/test/toEnglish.spec.js +++ b/test/toEnglish.spec.js @@ -24,6 +24,7 @@ const transliterations = [ [ 'ਹਰਿ ਹਰਿ ਹਰਿ ਗੁਨ ਗਾਵਹੁ ॥', 'har har har gun gaavahu |' ], [ 'ਹੁਕਮੈ ਅੰਦਰਿ. ਸਭੁ ਕੋ; ਬਾਹਰਿ ਹੁਕਮ. ਨ ਕੋਇ ॥', 'hukamai andar. sabh ko; baahar hukam. na koe |' ], [ 'ਸਹਜ; ਸਸਹਜ ਅਨਹਦ ਰਹਤ ਕਹਤ ਪਹਰ, ਸਹਸ ਮਹਲ ਟਹਲ ਕਹਨਨ ਕਹਨ', 'sehaj; sasahaj anahad rehat kehat pehar, sehas mehal ttehal kahanan kehan' ], + [ 'ਸਭ ਭਇਓ ਪਰਾਇਓ', 'sabh bheo paraaeo' ], ] describe( 'toEnglish()', () => {