« get me outta code hell

make unknown block/input messages clearer for site - scratchblocks-generator-3 - scratchblocks generator for projects made in 3.0
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-12-21 13:51:19 -0400
committerFlorrie <towerofnix@gmail.com>2019-12-21 13:51:19 -0400
commitea929918b8bfd83096535345dde6b13824a9b222 (patch)
tree265bb19f0226de6b7e701fca30259aad36f6e2b8 /src
parentfe477dc3e05360ac479a29db6001932b3158e157 (diff)
make unknown block/input messages clearer for site HEAD master
Diffstat (limited to 'src')
-rw-r--r--src/js/sb3-gen.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/sb3-gen.js b/src/js/sb3-gen.js
index 58c8452..81702b2 100644
--- a/src/js/sb3-gen.js
+++ b/src/js/sb3-gen.js
@@ -71,7 +71,7 @@ function input(inp, target, flag = false) {
             return '\n' + indent(blocksToScratchblocks(inp.value, target)) + '\n';
 
         default:
-            return `\x1b[33m<${inp.type}>\x1b[0m`;
+            return `(unknown input type [${inp.type}])`;
     }
 }
 
@@ -415,7 +415,7 @@ function blockToScratchblocks(block, target) {
             return `set pen hue to ${i('HUE')}`;
 
         default:
-            return `\x1b[33m${block.opcode} (${Object.keys(block.inputs).join(', ')})\x1b[0m`;
+            return `unknown block [${block.opcode}] \\(${Object.keys(block.inputs).map(k => `[${k}]`).join(', ')}\\)`;
 
     }
 }