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
While trying to use glue to append tags to a line, I found some odd behavior in v1.2.0. Gluing a line that only contains a tag seems to cause Ink to get stuck in glue mode until the next choice point. This snippet:
What happens if we glue in a line that only contains a tag?
<> # This is the tag of doom
Bad things.
Uh-oh.
produces the following:
What happens if we glue in a line that only contains a tag? Bad things.Uh-oh.
# This is the tag of doom
All subsequent lines will be glued in without whitespace until the next choice point, including across diverts or function calls.
This also happens when the line is only empty because of a conditional result (even if the tag is in the conditional):
Conditionally glue in some text with a tag.
<> {false: some text #with a tag}
Oh no
It's happening again
yields
Conditionally glue in some text with a tag. Oh noIt's happening again
The bug can be worked around by simply avoiding glue on tagged lines that may not contain text and instead putting all tag logic on the same line as the tagged content, but being able to split conditional logic across multiple lines is a lot more readable, e.g.:
While trying to use glue to append tags to a line, I found some odd behavior in v1.2.0. Gluing a line that only contains a tag seems to cause Ink to get stuck in glue mode until the next choice point. This snippet:
produces the following:
All subsequent lines will be glued in without whitespace until the next choice point, including across diverts or function calls.
This also happens when the line is only empty because of a conditional result (even if the tag is in the conditional):
yields
The bug can be worked around by simply avoiding glue on tagged lines that may not contain text and instead putting all tag logic on the same line as the tagged content, but being able to split conditional logic across multiple lines is a lot more readable, e.g.:
vs.
The text was updated successfully, but these errors were encountered: