TurboWarp / scratch-vm

Scratch VM with a JIT compiler and more features
https://turbowarp.org/
Mozilla Public License 2.0
75 stars 72 forks source link

Tab character should equal zero #115

Closed GarboMuffin closed 1 year ago

GarboMuffin commented 1 year ago

https://scratch.mit.edu/projects/788261699/

It's because Scratch's String.prototype.trim polyfill is broken: run '\t'.trim() on scratch.mit.edu then any other website. This in turn affects isWhiteSpace(). The unminified polyfill script that scratch-www is based on has a \t sequence, which a minifer converted to a literal tab character, which a text editor then converted to four spaces.