Expression is ignored if it start with a newline
<?xml version="1.0" encoding="UTF-8"?>
<scxml datamodel="ecmascript" xmlns="http://www.w3.org/2005/07/scxml" version="1.0">
<state>
<onentry>
<log label="Label" expr="
'Hello World'" />
</onentry>
</state>
</scxml>
Current Behavior
Label undefined
Expected Behavior
Label Hello World
Possible Solution
This seems to be caused by JavaScript's Auto Semicolon Insertion https://en.wikibooks.org/wiki/JavaScript/Automatic_semicolon_insertion#Examples (a line terminator follows a break, continue, return, or throw.
)
The generated code look like this
return
'Hello World'
So it's interpreted as
return;
'Hello World';
triming the expression should fix it but I don't know if it can have drawbacks, an alterative is to assign to a variable before returning
let value =
'Hello World'
return value