Open mattoshry opened 8 years ago
The fix is to hook the onopentagstart event and track the state of the line and column for use when the onopentag event fires.
@mattoshry Please try this again. SCION is now using a custom version of sax-js with better parsing behavior.
Running the following document through scxml-to-scjson:
yields the following {local.name, line, and column}:
Intuitively one would expect the line and column to reflect the location of the beginning of the start tag:
There are a couple of issues here:
\n
which, as demonstrated in the above example, may occur before theonopentag
event is emitted after all the attributes of the tag are consumed.