Whitespace is now removed from hex and binary even when the delimiter is set to 'None'

This commit is contained in:
n1474335 2017-09-05 14:30:06 +00:00
parent 1b628ac213
commit d4d12c3db0
2 changed files with 4 additions and 5 deletions

View File

@ -1235,7 +1235,8 @@ const Utils = {
"Forward slash": /\//g,
"Backslash": /\\/g,
"0x": /0x/g,
"\\x": /\\x/g
"\\x": /\\x/g,
"None": /\s+/g // Included here to remove whitespace when there shouldn't be any
},

View File

@ -288,10 +288,8 @@ const ByteRepr = {
* @returns {byteArray}
*/
runFromBinary: function(input, args) {
if (args[0] !== "None") {
const delimRegex = Utils.regexRep[args[0] || "Space"];
input = input.replace(delimRegex, "");
}
const delimRegex = Utils.regexRep[args[0] || "Space"];
input = input.replace(delimRegex, "");
const output = [];
const byteLen = 8;