Browse Source

Added word separator code to Morse Code ops.

n1474335 5 years ago
parent
commit
61e6423d95
2 changed files with 4 additions and 2 deletions
  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;