Closed Septh closed 10 months ago
Given the following block node (shown here in a html-y way, but I am actually talking of PM nodes):
<block> <p>1</p> <p></p> // <-- note: empty paragraph <p>2</p> </block>
Because the empty paragraph is present is the block's contents, I would expect block.textBetween(startOfBlock, endOBlock, "\n") to return "1\n\n2" (somehow akin to what array.join() does) but I'm getting "1\n2" instead. Is this intended behavior?
block.textBetween(startOfBlock, endOBlock, "\n")
"1\n\n2"
array.join()
"1\n2"
I don't think that was intentional. Attached patch should improve it.
Given the following block node (shown here in a html-y way, but I am actually talking of PM nodes):
Because the empty paragraph is present is the block's contents, I would expect
block.textBetween(startOfBlock, endOBlock, "\n")
to return"1\n\n2"
(somehow akin to whatarray.join()
does) but I'm getting"1\n2"
instead. Is this intended behavior?