I want to do some global transformations on the rendered HTML. More accurately, I want to add keyboard shortcuts to the links provided in the story. I am doing so quite successfully by using SugarCube’s
passagedisplay event. This works fine, but only initially. At some instances, some parts of the text is being rewritten using SugarCubes
<<replace>> macro. The
passagedisplay event is not fired again. Is there any way I can hook into the replace macro so I can re-run my script on the replaced text?
Twine Version: Tweego 1.3.0
Story Format: SugarCube 2.24.0