Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • harlowe harlowe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Games
  • harloweharlowe
  • Issues
  • #13
Closed
Open
Issue created Dec 02, 2015 by Bitbucket Importer@bitbucket_importerOwner

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(" "))
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking