Skip to content

Commit

Permalink
Merge 7d5c5ea into 2d19302
Browse files Browse the repository at this point in the history
  • Loading branch information
sarabveer committed Mar 17, 2022
2 parents 2d19302 + 7d5c5ea commit 056cd03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/toUnicode.js
Expand Up @@ -15,6 +15,7 @@ const replacements = [
[ /([MµyY])([uU])/ug, '$2$1' ], // Switch around lava/dulava/tipee with aunkar/dulankar
[ /`([wWIoOyYR®H§´ÍÏ眘†uU])/ug, '$1`' ], // Place adhak at end when vowels are either side
[ /i([´Î])/ug, '$1i' ], // Swap i with ´ or Î
[ /uo/ug, 'ou' ], // Swap aunkarh+hora for unicode compliant hora+aunakarh
]

// Precompute the replacements and mappings
Expand Down
2 changes: 2 additions & 0 deletions test/toUnicode.spec.js
Expand Up @@ -6,6 +6,8 @@ const words = [
[ 'ihr', 'ਹਿਰ' ],
[ 'imil´o', 'ਮਿਲੵਿੋ' ],
[ 'iBÎo', 'ਭ੍ਯਿੋ' ],
[ 'quohI', 'ਤੋੁਹੀ' ],
[ 'qouhI', 'ਤੋੁਹੀ' ],
[ 'kul jn mDy imil´o swrg pwn ry ]', 'ਕੁਲ ਜਨ ਮਧੇ ਮਿਲੵਿੋ ਸਾਰਗ ਪਾਨ ਰੇ ॥' ],
[ 'qU pRB dwqw dwin miq pUrw hm Qwry ByKwrI jIau ]', 'ਤੂ ਪ੍ਰਭ ਦਾਤਾ ਦਾਨਿ ਮਤਿ ਪੂਰਾ ਹਮ ਥਾਰੇ ਭੇਖਾਰੀ ਜੀਉ ॥' ],
[ 'so bRhmu AjonI hY BI honI Gt BIqir dyKu murwrI jIau ]2]', 'ਸੋ ਬ੍ਰਹਮੁ ਅਜੋਨੀ ਹੈ ਭੀ ਹੋਨੀ ਘਟ ਭੀਤਰਿ ਦੇਖੁ ਮੁਰਾਰੀ ਜੀਉ ॥੨॥' ],
Expand Down

0 comments on commit 056cd03

Please sign in to comment.