I like my text to read smoothly. Sometimes, the way a given sentence starts may depend on how the previous sentence ended.
If I use
<<linkreplace>> (a very handy tool!) to let the reader read some additional narrative if desired, I will sometimes need the following sentence (the one after the linkreplace content) to vary, depending on whether or not the linkreplace text was displayed. This is difficult to achieve.
One way to do it is to drop the start of the following sentence, containing all of the material that needs to vary, into the linkreplace. But in this case the start of the following sentence will be highlighted as part of the link. This is both ugly and inappropriate. So I tried the following (which doesn’t work):
<<set _done to false>>\ Testing: <<linkreplace "This text" t8n>>This text <<set _done to true>>has its own sentence ending.<</linkreplace>> <<if _done is false>>still needs a sentence ending.<</if>>
It doesn’t work, I believe, because the material outside the linkreplace has already been rendered. That is, the variable
_done has been evaluated early. The value is changed inside the linkreplace, but that doesn’t matter, because the text after the linkreplace has already been set up by the browser and is not being revised.
Is there a way to force the browser to re-evaluate an already rendered textblock and then reprint it after the new value of a variable has been set?