guide-me / GuideMe

an interactive story viewer
MIT License
4 stars 8 forks source link

Add attribute support to Text tags #53

Closed EroticDevelopment closed 3 years ago

EroticDevelopment commented 4 years ago

Adds support for if-set, if-not-set, if-before, and if-after attributes to Text tags. Please note, attributes are only supported on the root <Text> tag, and not on sub-nodes such as <P> tags etc.

Perhaps somewhat obviously, this also means <Text> nodes can appear more than once in a <Page> now. Text nodes are concatenated in the order they appear, taking into consideration the conditional attributes. An abbreviated constructor needing only the text string was created on the Text model to aid in backwards compatibility and creating special pages (like the 404) on the fly.

You can use This Test Script (txt extension added to make GitHub happy) to test these new features.

Resolves #9