Lines
linesBlock elementCode
A chunk of literal code lines inside a `canvas.code` pane — the unit cues wrap and the unit everything else addresses. Chunks rather than line numbers, because choreography shifts line numbers: the moment a cue inserts three lines, every number below it points at the wrong line. Common indentation is stripped, so the chalk source can be indented normally.
Attributes
indentImplicit
numberDefault0
highlight
booleanDefaultfalse
error-lines
index-listerror-message
stringadded-lines
index-listremoved-lines
index-listAllowed content
Body { }Literal code lines, kept verbatim.
Allowed in
Examples
lines{
def f(x):
return x * 2
}lines{
return x * 2
}(
highlight: true
)lines{
def f(x):
return undefined_name
}(
error-lines: 2
error-message: NameError: name 'undefined_name' is not defined
)lines{
return total / len(values)
}(
indent: 1
added-lines: 1
)