瀏覽代碼

Added word separator code to Morse Code ops.

n1474335 5 年之前
父節點
當前提交
61e6423d95
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 2 1
      src/core/operations/FromMorseCode.mjs
  2. 2 1
      src/core/operations/ToMorseCode.mjs

+ 2 - 1
src/core/operations/FromMorseCode.mjs

@@ -147,7 +147,8 @@ const MORSE_TABLE = {
     "=": "<dash><dot><dot><dot><dash>",
     "&": "<dot><dash><dot><dot><dot>",
     "_": "<dot><dot><dash><dash><dot><dash>",
-    "$": "<dot><dot><dot><dash><dot><dot><dash>"
+    "$": "<dot><dot><dot><dash><dot><dot><dash>",
+    " ": "<dot><dot><dot><dot><dot><dot><dot>"
 };
 
 export default FromMorseCode;

+ 2 - 1
src/core/operations/ToMorseCode.mjs

@@ -148,7 +148,8 @@ const MORSE_TABLE = {
     "=": "<dash><dot><dot><dot><dash>",
     "&": "<dot><dash><dot><dot><dot>",
     "_": "<dot><dot><dash><dash><dot><dash>",
-    "$": "<dot><dot><dot><dash><dot><dot><dash>"
+    "$": "<dot><dot><dot><dash><dot><dot><dash>",
+    " ": "<dot><dot><dot><dot><dot><dot><dot>"
 };
 
 export default ToMorseCode;