Hi everyone,
I have a difficulty to get my head around this: when rendering the text below with syntax xwiki/2.1
, Item 3 and Item 4 are interpreted as being part of a sublist under Item 2, while I would have expected they’re considered as siblings of Item 1 and Item 2 in the same list, since they’re declared on a new line. I guess there’s a good reason for the former interpretation over the latter, but any explanation would be welcome:
* Item 1
* Item 2
(((
* Item 3
)))
(((
* Item 4
)))
Also, when parsing then rendering the same text using syntax xwiki/2.1
, I get the following output:
* Item 1
* (((
Item 2(((
* Item 3
)))
(((
* Item 4
)))
)))
I have the following questions:
- Why is there a new line inserted between Item 3 and Item 4?
- Why is a group created for Item 2?
- More generally: is a parsing operation followed by a rendering one (using a common syntax for both operations and on a content that is syntaxically correct) supposed to produce an output that is equal to the input or is it not part of the contract? I guess it’s not but it would be helpful to be sure and if we know the exact range of changes that are considered legitimate.
The related issue I’m facing is a case where the group creation on a list item produces a layout bug, when using the html
macro with wiki="true"
on the following content structure:
<section>
* Item 1
* Item 2
</section>
<p>
(((
* Item 3
)))
</p>
<p>
(((
* Item 4
)))
</p>
This input is transformed as follows when parsed then rendered in xwiki/2.1
, which then becomes invalid HTML (due to the section
tag not being closed at a valid position):
<section>
* Item 1
* (((
Item 2
</section>
<p>(((
* Item 3
)))</p>
<p>
(((
* Item 4
)))</p>
)))
Any insight welcome!
Thanks & Cheers
Stéphane