Skip to content

Commit

Permalink
Handle ye -> e;
Browse files Browse the repository at this point in the history
  • Loading branch information
borota committed Oct 11, 2017
1 parent e15316c commit 5c69b3a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Following bundles are available:
libraries and applications

The package could also be downloaded directly from:
[https://registry.npmjs.org/cal-sedra/-/cal-sedra-1.0.5.tgz](https://registry.npmjs.org/cal-sedra/-/cal-sedra-1.0.5.tgz)
[https://registry.npmjs.org/cal-sedra/-/cal-sedra-1.0.6.tgz](https://registry.npmjs.org/cal-sedra/-/cal-sedra-1.0.6.tgz)

## More information

Expand Down
2 changes: 1 addition & 1 deletion doc/readme.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Following bundles are available:
libraries and applications

The package could also be downloaded directly from:
[https://registry.npmjs.org/cal-sedra/-/cal-sedra-1.0.5.tgz](https://registry.npmjs.org/cal-sedra/-/cal-sedra-1.0.5.tgz)
[https://registry.npmjs.org/cal-sedra/-/cal-sedra-1.0.6.tgz](https://registry.npmjs.org/cal-sedra/-/cal-sedra-1.0.6.tgz)

## More information

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cal-sedra",
"version": "1.0.5",
"version": "1.0.6",
"description": "Convert from CAL code to Sedra 3 ASCII transliteration",
"main": "build/cal-sedra.js",
"mainMin": "build/cal-sedra.min.js",
Expand Down Expand Up @@ -60,7 +60,7 @@
},
"homepage": "https://github.com/peshitta/cal-sedra#readme",
"dependencies": {
"aramaic-mapper": "^1.0.6",
"aramaic-mapper": "^1.0.7",
"cal-code-util": "^1.0.7",
"sedra-code-util": "^1.0.4"
},
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const isDev = process.env.BUILD === 'dev';
const banner = isProduction
? '/**\n' +
'* @file Convert from CAL code to Sedra 3 ASCII transliteration\n' +
'* @version 1.0.5\n' +
'* @version 1.0.6\n' +
'* @author Greg Borota\n' +
'* @copyright (c) 2017 Greg Borota.\n' +
'* @license MIT\n' +
Expand Down
4 changes: 3 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const mapCallback = (word, i, fromTo) => {
m =
word.charAt(i + 1) === 'i'
? 'i;' // Sedra stores as (iy)
: map(c, fromTo);
: word.charAt(i + 1) === 'e'
? 'e;' // Sedra stores as (ey)
: map(c, fromTo);
break;
case 'w':
m =
Expand Down
8 changes: 8 additions & 0 deletions test/index_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ describe('CAL', () => {
test.strictEqual(word, wordExpected, 'toSedra_yi consonant');
test.strictEqual(vocalised, vocalisedExpected, 'toSedra_yi vocalised');
});
it('Word with (ye) => (e;) mapping', () => {
const word = sut.toSedra('byt');
const vocalised = sut.toSedra("b'yet,");
const wordExpected = 'B;T';
const vocalisedExpected = "B'e;T,";
test.strictEqual(word, wordExpected, 'toSedra_ye consonant');
test.strictEqual(vocalised, vocalisedExpected, 'toSedra_ye vocalised');
});
it('Word with short Eastern (E) => (e) mapping', () => {
const word = sut.toSedra(')wld');
const vocalised = sut.toSedra(')awlEd');
Expand Down

0 comments on commit 5c69b3a

Please sign in to comment.