deepMap
not iterating over elements with only text as children.
#31
Labels
deepMap
not iterating over elements with only text as children.
#31
Consider the following elements,
I use
deepMap
over each element andconsole.log
each child as it is iterated over. In the first case it only iterates over the<p>
element.In the second case it iterates over three elements: the "Test text 2" at the start, the
<span>
element and the "test text 4" at the end.Is this the intended behaviour?
In the first case I would have thought that the "Test text 1" text was a child of the
<p>
tag, and thereforedeepMap
should recurse again over the "Test text 1" child.In the second case I would have thought that
deepMap
should recurse into the "Test text 3" text inside the<span>
element since I would have thought that the "Test text 3" text was a child of<span>
.The text was updated successfully, but these errors were encountered: