Calling the split method of a string results in an unexpected identifier error
Created originally on Bitbucket by prof_yaffle
When running the following code
#!
(set: $test to "a b c d")
(print: $test.split(" "))
The result is an unexpected identifier error. Looking at the code in the editor, the 'it' part is in a different colour, so it could be connected to how Harlowe handles the keyword 'it'.
A workaround is to add the following code to the story's javascript:
#!javascript
String.prototype.spl = String.prototype.split;
And to the split any strings using
#!
(print: $test.spl(" "))