Open DrMurx opened 11 months ago
With useArray = SOMETIMES and preserveMarkup = SOMETIMES, a setting of simplifyNodes = false doesn't behave as expected. It affects on the emitted top-level node, while all sub-nodes are still simplified.
useArray = SOMETIMES
preserveMarkup = SOMETIMES
simplifyNodes = false
For example:
<top class="x"> <sub type="a" /> <sub type="b" /> </top>
will result in
top: { $attrs: { class: "x" }, sub: [ { type: "a" }, { type: "b"} ] }
but I'd expect
top: { $attrs: { class: "x" }, sub: [ { $attrs: { type: "a" } }, { $attrs: { type: "b" } } ] }
(It's also debatable whether the entries in the sub array should be stripped of their $name key - even if it's redundant, it wouldn't hurt)
sub
$name
With
useArray = SOMETIMES
andpreserveMarkup = SOMETIMES
, a setting ofsimplifyNodes = false
doesn't behave as expected. It affects on the emitted top-level node, while all sub-nodes are still simplified.For example:
will result in
but I'd expect
(It's also debatable whether the entries in the
sub
array should be stripped of their$name
key - even if it's redundant, it wouldn't hurt)