You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the syntax it looks like the actions are specific to the "rule call" and not globally set, but running this grammar in the online editor it looks to global.
{
"origin":"I love #[animal:#cat#]say# and #say#",
"say":"#animal.s#",
"animal": "dog",
"cat":"cat"
}
In the online editor this outputs: "I love cats and cats", and not what I would expect (I love cats and dogs).
To get the result that I want, the documentation suggests I need to use a POP before the second call, like this:
"origin":"I love #[animal:#cat#]say# and #[animal:POP]say#",
But this doesn't change anything, it still outputs "I love cats and cats".
What is the correct behavior here?
The text was updated successfully, but these errors were encountered:
I don't remember how it behaves in this specific Tracery version, but the original intention was for push actions inside of the tags ie "#[animal:#cat#]say#" was to push a rule, and then autopop it once the tag finished expanding. Actions by themselves "[animal:#cat#] #say#" just push, but don't autopop.
Eventually though, I unofficially deprecated the autopop: no-one seemed to be using that functionality, and it made the book-keeping of push/pop more error-prone. For Tracery2, I'm leaving it out entirely. The syntax of putting [] inside ## conflicts with some of the new tracery2 features, but I think this is the only bit of tracery syntax that's been dropped/changed.
From the syntax it looks like the actions are specific to the "rule call" and not globally set, but running this grammar in the online editor it looks to global.
In the online editor this outputs: "I love cats and cats", and not what I would expect (I love cats and dogs).
To get the result that I want, the documentation suggests I need to use a POP before the second call, like this:
"origin":"I love #[animal:#cat#]say# and #[animal:POP]say#",
But this doesn't change anything, it still outputs "I love cats and cats".
What is the correct behavior here?
The text was updated successfully, but these errors were encountered: