From 6adc5dda93668e15ab27c84f60dabf1c91e7222b Mon Sep 17 00:00:00 2001 From: n1073645 Date: Thu, 5 Dec 2019 11:09:40 +0000 Subject: [PATCH] FromBraille needs some work --- src/core/lib/Magic.mjs | 6 +++--- src/core/operations/FromBraille.mjs | 9 +-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/core/lib/Magic.mjs b/src/core/lib/Magic.mjs index 3222166b..526195ac 100644 --- a/src/core/lib/Magic.mjs +++ b/src/core/lib/Magic.mjs @@ -245,7 +245,7 @@ class Magic { } /** - * Uses the checks to validate the input//output of potential operations. + * Uses the checks to validate the input/output of potential operations. * * @param {string} flag * @param {array} sensible @@ -331,10 +331,10 @@ class Magic { */ async speculativeExecution(depth=0, extLang=false, intensive=false, recipeConfig=[], useful=false, crib=null) { if (depth < 0) return []; - + console.log("still alive"); // Find any operations that can be run on this data const matchingOps = this.opPatterns.findMatchingInputRegexes(this.inputStr); - + console.log(matchingOps); let results = []; // Record the properties of the current data diff --git a/src/core/operations/FromBraille.mjs b/src/core/operations/FromBraille.mjs index 1318831b..3007c1b1 100644 --- a/src/core/operations/FromBraille.mjs +++ b/src/core/operations/FromBraille.mjs @@ -26,14 +26,6 @@ class FromBraille extends Operation { this.inputType = "string"; this.outputType = "string"; this.args = []; - this.checks = new magicObject([ - { - match: "^\\s*[⠀⠁⠂⠃⠄⠅⠆⠇⠈⠉⠊⠋⠌⠍⠎⠏⠐⠑⠒⠓⠔⠕⠖⠗⠘⠙⠚⠛⠜⠝⠞⠟⠠⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫⠬⠭⠮⠯⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹⠺⠻⠼⠽⠾⠿]+\\s*$", - flags: "i", - magic: true, - args: [true] - } - ]); } /** @@ -42,6 +34,7 @@ class FromBraille extends Operation { * @returns {string} */ run(input, args) { + console.log("this is broke"); return input.split("").map(b => { const idx = BRAILLE_LOOKUP.dot6.indexOf(b); return idx < 0 ? b : BRAILLE_LOOKUP.ascii[idx];