[align center] mess with [if]

Twine Version: 3.9.1
chapbook Version: 2.1.0

in a nut, this work:

[if whatever]
[[here->this passage]]
[else]
[[that passage]]

printing correctly the link to this passage if whatever is true and the link to that passage if whatever is false, with the default left alignment.

but this don’t work:

[if whatever]
[align center]
[[here->this passage]]
[else]
[[that passage]]

don’t work, printing both passages, ignoring the [else] clause.

This seems to me a bug, or I missed something in the documentation ??

Best regards from Italy,
dott. Piergiorgio.

I tried creating a project with this code:

[if 1==1]
[align center]
[[here->this passage]]
[else]
[[that passage]]

and it renders correctly. Changing the condition from/to 1==2 renders either “here” (centered) or “that passage” (left-aligned) links. The description of the bug suggests that the if structure is broken. Are there any other tags in the real code? I’d recommend checking for unbalanced square brackets somewhere.

1 Like