Describe the bug
When a Say command contains a text wrapped into square brackets, that portion of text (including the brackets) is parsed out and not rendered ingame.
This happens due to the changes to Fungus to support Ink variable text. The responsible script is Fungus/Scripts/Utils/TextVariationHandler.cs, method TokenizeVarySections.
To Reproduce
Go to the scene 'TheExperiment' in the FungusExample 'Sherlock'
Open the flowchart window, select the START block, select the first Say command
Replace the text 'THE EXPERIMENT' with the text 'THE [test] EXPERIMENT'
Play the game
When that command is executed, you expect to read'THE [test] EXPERIMENT', instead you will read 'THE EXPERIMENT'
Expected behavior
I understand this behavior is working as intended, but maybe it's possible somehow to restore the possibility of displaying text wrapped into square brackets.
In my understanding, the variable text has into the brackets other special characters in order to control its behavior (|, &, !, ~). A possible solution would be for the code to check for any of these characters inside the square brackets. If there's none, then it means it's not a variable text and so it should be rendered as it is.
Another option is to treat square brackets (and other characters as well) as special characters, and provide an escape mechanism. Or something like HTML special chars, whereas the string [ would be rendered as a left square bracket and the character [ would be considered a special character to be parsed.
Screenshots
Versions & Platform (please complete the following information):
Describe the bug When a Say command contains a text wrapped into square brackets, that portion of text (including the brackets) is parsed out and not rendered ingame. This happens due to the changes to Fungus to support Ink variable text. The responsible script is Fungus/Scripts/Utils/TextVariationHandler.cs, method TokenizeVarySections.
To Reproduce
Expected behavior I understand this behavior is working as intended, but maybe it's possible somehow to restore the possibility of displaying text wrapped into square brackets. In my understanding, the variable text has into the brackets other special characters in order to control its behavior (|, &, !, ~). A possible solution would be for the code to check for any of these characters inside the square brackets. If there's none, then it means it's not a variable text and so it should be rendered as it is. Another option is to treat square brackets (and other characters as well) as special characters, and provide an escape mechanism. Or something like HTML special chars, whereas the string [ would be rendered as a left square bracket and the character [ would be considered a special character to be parsed.
Screenshots
Versions & Platform (please complete the following information):