Multiline text adds newlines & indentation on save
This issue appears in the currently available 1.1 release.
I'm using what I thought to be a fairly standard approach, a node with an @multiLine EString
in the MGL and a multiText
element in the style:
nodeStyle Note(1) {
rectangle {
appearance artifact
size (200, 100)
multiText {
appearance body
position(CENTER, MIDDLE)
value "%s"
}
}
}
@palette("Workflow")
@style(Note, "${note}")
node Note {
@multiLine
attr EString as note
outgoingEdges (NoteAnchor [0, *])
}
Before saving the file, everything seems ok:
As soon as I hit Ctrl+S
to save the file, newlines are added between each line, and unwanted indentation appears:
Adding a fourth line:
After saving:
The issue seems to originate from both adding an actual line break as well as an escaped one to the output file, and not stripping indentation during reading:
BuildMap _kVj4oTD1Eeut2M9DkrxRjQ {
stageAssignmentStrategy AS_EARLY_AS_POSSIBLE
Note _k7cM4TD1Eeut2M9DkrxRjQ at 200,20 size 200,140 {
note "Line1
\nLine2
\nLine3"
}
}