Fix project loading with bad text-number connections
@@ -39,6 +39,15 @@ Blockly.WarningHandler.WarningState = {
ERROR: 2
};
+/**
+ * Regular expression for floating point numbers.
+ *
+ * @type {!RegExp}
+ * @const
+ */
+Blockly.WarningHandler.NUMBER_REGEX =
+ new RegExp("^[-+]?[0-9]*(\\.[0-9]+)?([eE][-+][0-9]+)?$")
+
/**
* The currently selected index into the array of block IDs with warnings. If nothing has been
* selected (i.e., if we are not stepping through warnings), this should be -1 so that the next
