Open stebanos opened 6 years ago
I added a WHITESPACE character range in b0c1d1b, because some students had trouble with the ALT+SPACE character in the workshop. This range is not complete.
@stebanos What other characters would be needed to be added in the range?
I think it's these: https://stackoverflow.com/questions/6073637/javascript-regex-whitespace-characters
charcodes: 9, 10, 11, 12, 13, 32, 160, 8232, 8233
Maybe there's more?
Okay so we got \t, \n, \v, \f, \r, " "
for the first six ones.
String.fromCharCode()
gives " ", \u2028, \u2029
for the last three.
Right now, as individual characters goes, only single spaces " " are considered white space, and we tell the parser to skip those in some instances (most importantly when they occur between {{ }} tokens). But sometimes white space is not visible to the eye, causing errors that are hard to spot. Extend the skipWhitespace function to characters that are also considered white space.
The alternative is to make such white space characters visible in the editor. For that, #19 is a prerequisite.