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
{{ message }}
Repository navigation
Knot tags causing empty line before anything which isn't story content #974
When using Knot tags, an empty line is added at the start of the knot when the first line is intended to be anything which isn't story content (eg. conditionals, brackets, variables).
This is using godot-ink, but based on how the structure changes in the preview when adding text before the non story content I'm not sure it's a bug with godot-ink.
Using the following code:
=== Approach ===
# blacksmith
# neutral
# 40
~ temp randomGreeting = RANDOM(1,2)
{randomGreeting == 1 and not greeted: Hail. Let us keep this brief. }
{randomGreeting == 2 and not greeted: What work does thou require? }
~ greeted = true
+ [What do you do?]
-> Tutorial
+ [I have work for you]
-> Work
-> END
Results in:
# blacksmith, neutral, 40
What work does thou require?
[What do you do?]
[I have work for you]
Instead of what I guessing should be:
What work does thou require?
# blacksmith, neutral, 40
[What do you do?]
[I have work for you]
I suspect this isn't intentional since when adding text between the tags and the variable, this changes to:
Added text line
# blacksmith, neutral, 40
What work does thou require?
[What do you do?]
[I have work for you]
changed the title [-]Knot tags causing empty line before conditional content[/-][+]Knot tags causing empty line before anything which isn't story content[/+]on Mar 19, 2026
The workaround I settled on was to create a function then use that as the first line of the Knot:
VAR greeted = false
-> Approach
=== Approach ===
# blacksmith
# neutral
# 40
{ RandomGreeting() }
~ greeted = true
+ [What do you do?]
-> Tutorial
+ [I have work for you]
-> Work
-> END
// This has to be done in function to count as a single line
// and allow us to use Knot tags without an blank line at the start
=== function RandomGreeting ===
~ temp output = ""
~ temp randomGreeting = RANDOM(1,2)
{
- randomGreeting == 1 and not greeted:
~ output = "Hail. Let us keep this brief."
- randomGreeting == 2 and not greeted:
~ output = "What work does thou require?"
}
~ return output
Activity
[-]Knot tags causing empty line before conditional content[/-][+]Knot tags causing empty line before anything which isn't story content[/+]AfroSpartan commentedon Mar 19, 2026
The workaround I settled on was to create a function then use that as the first line of the Knot: