Skip to content

Commit 73bc4e5

Browse files
committed
Fix wrong encoding/decoding of two japanese characters: オand エ - thanks to Yui Makino
1 parent 6629025 commit 73bc4e5

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

dist/morsify.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "morsify",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"description": "Morse code translator, Morse encoder and decoder which can also generate audio.",
55
"keywords": [
66
"morsify",
@@ -36,16 +36,16 @@
3636
"url": "https://github.com/ozdemirburak/morsify.git"
3737
},
3838
"devDependencies": {
39-
"@babel/core": "^7.8.4",
40-
"@babel/preset-env": "^7.8.4",
39+
"@babel/core": "^7.11.6",
40+
"@babel/preset-env": "^7.11.5",
4141
"coveralls": "^3.0.9",
4242
"gulp": "^4.0.2",
4343
"gulp-babel": "^8.0.0",
4444
"gulp-babel-minify": "^0.5.1",
4545
"gulp-concat": "^2.6.1",
4646
"istanbul": "^0.4.5",
47-
"jshint": "^2.11.0",
48-
"lodash": "^4.17.15",
47+
"jshint": "^2.12.0",
48+
"lodash": "^4.17.20",
4949
"mocha": "^6.2.2"
5050
},
5151
"main": "./src/morsify.js",

src/morsify.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@
7777
'マ': '1001', 'ヤ': '011', 'ラ': '000', 'ワ': '101', 'イ': '01', 'キ': '10100',
7878
'シ': '11010', 'チ': '0010', 'ニ': '1010', 'ヒ': '11001', 'ミ': '00101', 'リ': '110',
7979
'ヰ': '01001', 'ウ': '001', 'ク': '0001', 'ス': '11101', 'ツ': '0110', 'ヌ': '0000',
80-
'フ': '1100', 'ム': '1', 'ユ': '10011', 'ル': '10110', 'ン': '01010', 'エ': '01000',
80+
'フ': '1100', 'ム': '1', 'ユ': '10011', 'ル': '10110', 'ン': '01010', 'エ': '10111',
8181
'ケ': '1011', 'セ': '01110', 'テ': '01011', 'ネ': '1101', 'ヘ': '0', 'メ': '10001',
82-
'レ': '111', 'ヱ': '01100', 'オ': '10111', 'コ': '1111', 'ソ':'1110', 'ト': '00100',
82+
'レ': '111', 'ヱ': '01100', 'オ': '01000', 'コ': '1111', 'ソ':'1110', 'ト': '00100',
8383
'ノ': '0011', 'ホ': '100', 'モ': '10010', 'ヨ': '11', 'ロ': '0101', 'ヲ': '0111',
8484
'゛': '00', '゜': '00110', '。': '010100', 'ー': '01101', '、': '010101',
8585
'(': '101101', ')': '010010'

test/morsify.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ describe('morsify', function () {
128128
t.equal(morsify.encode('マヤラワイキ', options), '-・・- ・-- ・・・ -・- ・- -・-・・');
129129
t.equal(morsify.encode('シチニヒミリ', options), '--・-・ ・・-・ -・-・ --・・- ・・-・- --・');
130130
t.equal(morsify.encode('ヰウクスツヌ', options), '・-・・- ・・- ・・・- ---・- ・--・ ・・・・');
131-
t.equal(morsify.encode('フムユルンエ', options), '--・・ - -・・-- -・--・ ・-・-・ ・-・・・');
131+
t.equal(morsify.encode('フムユルンエ', options), '--・・ - -・・-- -・--・ ・-・-・ -・---');
132132
t.equal(morsify.encode('ケセテネヘメ', options), '-・-- ・---・ ・-・-- --・- ・ -・・・-');
133-
t.equal(morsify.encode('レヱ、オコソ', options), '--- ・--・・ ・-・-・- -・--- ---- ---・');
133+
t.equal(morsify.encode('レヱ、オコソ', options), '--- ・--・・ ・-・-・- ・-・・・ ---- ---・');
134134
t.equal(morsify.encode('トノホモヨロ', options), '・・-・・ ・・-- -・・ -・・-・ -- ・-・-');
135135
t.equal(morsify.encode('ヲ゛゜。ー', options), '・--- ・・ ・・--・ ・-・-・・ ・--・-');
136136
t.equal(morsify.encode('()', options), '-・--・- ・-・・-・');
@@ -141,9 +141,9 @@ describe('morsify', function () {
141141
t.equal(morsify.decode('-・・- ・-- ・・・ -・- ・- -・-・・', options), 'マヤラワイキ');
142142
t.equal(morsify.decode('--・-・ ・・-・ -・-・ --・・- ・・-・- --・', options), 'シチニヒミリ');
143143
t.equal(morsify.decode('・-・・- ・・- ・・・- ---・- ・--・ ・・・・', options), 'ヰウクスツヌ');
144-
t.equal(morsify.decode('--・・ - -・・-- -・--・ ・-・-・ ・-・・・', options), 'フムユルンエ');
144+
t.equal(morsify.decode('--・・ - -・・-- -・--・ ・-・-・ -・---', options), 'フムユルンエ');
145145
t.equal(morsify.decode('-・-- ・---・ ・-・-- --・- ・ -・・・-', options), 'ケセテネヘメ');
146-
t.equal(morsify.decode('--- ・--・・ ・-・-・- -・--- ---- ---・', options), 'レヱ、オコソ');
146+
t.equal(morsify.decode('--- ・--・・ ・-・-・- ・-・・・ ---- ---・', options), 'レヱ、オコソ');
147147
t.equal(morsify.decode('・・-・・ ・・-- -・・ -・・-・ -- ・-・-', options), 'トノホモヨロ');
148148
t.equal(morsify.decode('・--- ・・ ・・--・ ・-・-・・ ・--・-', options), 'ヲ゛゜。ー');
149149
t.equal(morsify.decode('-・--・- ・-・・-・', options), '()');

0 commit comments

Comments
 (0)