| Steps to reproduce:
- Create a page in the markdown/1.2 syntax with the content:
- Edit the page with the WYSIWYG editor and save it without changes
Expected: the content is unchanged. Actual: the content becomes the following, so the paragraph inside the div and the closing </div> are lost:
Cause: each HTML block is parsed as its own html macro (clean=false), so the opening <div class="red"> and the closing </div> become two unbalanced macros, with the Markdown content as normal blocks between them. The WYSIWYG editor can't round-trip an unbalanced <div>. Possible solution: parse the whole <div>…</div> block, content included, into a single html macro with clean=false, and render that macro back as the <div> block in Markdown. Workaround (once MARKDOWN-56 is released): add the data-xwiki-group attribute to the div so it is parsed as a Group. |