Cutting doesn't capture card section immediately following a list section
Closed this issue · 1 comments
kevinansfield commented
When cutting content that includes a card section immediately following a list section, the card is not captured as part of the serialised mobiledoc in the clipboard's html
attribute.
Example html
when a non-card section separates the list and card sections:
<meta charset='utf-8'><div data-mobiledoc='{"version":"0.3.1","atoms":[],"cards":[["markdown",{"markdown":"markdown card"}]],"markups":[],"sections":[[3,"ul",[[[0,[],0,"list"]]]],[1,"p",[[0,[],0,"test"]]],[10,0],[1,"p",[[0,[],0,"test"]]]]}'><div><ul><li>list</li></ul><p>test</p><p>test</p></div></div>
Example html
when a card section immediately follows a list section:
<meta charset='utf-8'><div data-mobiledoc='{"version":"0.3.1","atoms":[],"cards":[],"markups":[],"sections":[[3,"ul",[[[0,[],0,"list"]]]],[1,"p",[[0,[],0,"test"]]]]}'><div><ul><li>list</li></ul><p>test</p></div></div>
kevinansfield commented
Initial testing appears to suggest the problem is in post.trimTo(range)
. I'm looking at creating a failing test case and fix.