$exit[0].text is a valid variable name.
<<$exit[o].text>> will print out it's value.
[[<<#exit[0].text>>|somewhere]] however does not work. The editor and runtime both seem to the the closing square bracket on the array reference as the end delimiter for the link.
Should I raise an issue for it?
Comments
[[$exit[0].text|somewhere]]
Printing is, I think, necessary to get the variables contents shown on the screen - it seems to work for simple variables.
Did you test what "The Pixie" suggested by generating a HTML file and testing it, or did just type it into the editor and notice the highlighter was not happy?
[[<<$exit[0]>>|Self]] produced North|Self]] - as normal text.
[[<<print $exits[0]>>|Self]] also produced North|Self]] - as normal text.
Last test code was:
Tangentially, since SugarCube was brought up, in most places where SugarCube supports $variables, it supports variables of arbitrary complexity. Meaning: The only caveat is within the wikitext link and image markup. If the $variable ends in the square-bracket notation and would adjoin the closing square-brackets of the link/image markup, then you'll need to add space between the $variable and the closing square-brackets of the markup (since it would otherwise be ambiguous to the parser). For example: