Suppose I have a variable $someVar that contains the following text: $eric
If I put $someVar in my passage I get 0, because it's trying to evaluate $eric as a variable. (print: $someVar) does the same thing. How can I print that variable as a string literal without it being evaluated?
Comments
It's a hassle for strings generated by Javascript, because they have to escape them manually. Also, backslash is the escape character in strings being passed to Javascript. Where does that string parsing happen? In Harlowe, or in shared Twine code? I'd like to explore other ways to mark strings as literals (without breaking existing syntax of course) and maybe submit a patch.
a. storyformat.publish
b. story.publish
c. passage.publish
All the real work is done by the javascript engine contained in each of the story formats, and as each engine is unique you would need to look at it's source code to see what passage text processing it does.