The current implementation of transform.NewTransformvertical and consume methods can't handle hierarchical children that are not descendants on the original AST.
This can happen when \include-ing files, as we saw in #178.
Unit test:
// in tests.Test_09_Issues.hx
public function test_issue_0186()
{
var exp = transform(expand(
VElemList([
Chapter(Word("cte")),
VElemList([
Section(Word("foo")),
SubSection(Word("bar"))
])
])));
var got = transform(expand(
VElemList([
Chapter(Word("cte")),
VElemList([
Section(Word("foo"))
]),
VElemList([
SubSection(Word("bar"))
])
])));
Assert.same(exp, got);
}
The current implementation of
transform.NewTransform
vertical
andconsume
methods can't handle hierarchical children that are not descendants on the original AST.This can happen when
\include
-ing files, as we saw in #178.Unit test: