Closed juhana closed 11 years ago
Actually this seems to work only with line output. Character output gets stuck printing backslashes indefinitely.
It would be better to fix it in src/structio/api.js I think. The problem is that I didn't realise that jQuery's text() function escapes backslashes. So it should be simple enough to fix it in basic_stream_handler(). Do you want to do it?
Off-topic: you might like to add a comment to http://inform7.uservoice.com/forums/57320-general/suggestions/3608381-run-vm-initialise-as-a-for-starting-the-virtual-ma
I tried it but basic_stream_handler()
is too late, the string it receives has already "parsed" the backslashes (the string contains the newline character instead of \
+ n
, for example). The escaping has to be done in an earlier stage, but I don't know the engine well enough to tell what point that would be.
That should not be the case. Okay, I'll track it down and fix it ASAP.
Juhana, this seems to fix everything that I've tried. What did you mean by "Character output gets stuck printing backslashes indefinitely" and is it still a problem?
Sorry for the late reply, but this does seem to work, thanks! I'm not using buffering for the Vorple JavaScript stream (although I should) so it prints it out character by character, but even that works with this fix.
This is a fix to a bug in zvm that causes any backslashes in the story output to be considered as escape characters.
\n
produces a newline,\\
shows only one backslash etc.\'
crashes Parchment completely. See http://iplayif.com/?story=https://dl.dropbox.com/u/27567916/test.z8 for a test case.