Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

How do you regex an entire page before it outputs to reader? [Sugarcube 2.1]

$
0
0
Hi. Thanks for all your help.

I've been writing stuff using a lot of twinescript and I just realised I need to run a regex at the end to clean up some grammar mistakes.

Is the text printed into Twinescript saved to a variable somewhere before it's output to the page? I could just regex that in javascript. Alternatively, is there a way to make a replace function fire on the entire passage or an entire element right before it becomes visible to the reader using TwineScript somehow?

TLDR: This is basically my problem. How do I fix it without changing anything inside the print macro?
<<print "I want to edit this text so that an big elephant becomes a big elephant">>


Viewing all articles
Browse latest Browse all 1844

Trending Articles