Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation inside <<if>> conditional options creates extra text node #77

Open
mnbroatch opened this issue Jun 25, 2021 · 0 comments
Open

Comments

@mnbroatch
Copy link

mnbroatch commented Jun 25, 2021

This is the example for conditional options per https://yarnspinner.dev/docs/writing/controlling/#options :

Mae: Ok kids we're gonna go with...
[[Actually, I'm not sure yet...|NotSure]]
<<if $robot_head_0_done is 1>>
    [[Frog Head|PickRobotMascot0]]
<<endif>>
<<if $robot_head_1_done is 1>>
    [[Pig Head|PickRobotMascot1]]
<<endif>>
<<if $robot_head_2_done is 1>>
    [[Rabbit Head|PickRobotMascot2]]
<<endif>>

Running this through bondage (by importing and exporting through the online editor), I notice that after the TextResult with Mae: Ok kids we're gonna go with..., I get one with just before I get to the options (or option, unless I'm using alforno's fork, but that's beside the point)

edit: It turns out that just text inside a conditional remains indented, such that

<<if 1 is 1>>
    hello
<<endif>>

yields &nbsp;&nbsp;&nbsp;&nbsp;hello. (just regular spaces; I can't figure out how to make them appear here lol)

@mnbroatch mnbroatch changed the title Indentation inside <<if>> blocks creates extra text node Indentation inside <<if>> conditional options creates extra text node Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant