There is 1 comment.
 
 
XWiki Rendering / cid:jira-generated-image-avatar-f3e91e64-e97e-4500-9384-54e64d6842ad XRENDERING-5 Open

List items that contain sub-items followed by text are not rendered properly

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-501e28e2-6868-459b-8bb1-2f7b2ef5c2a6 Michael Hamann on 14/Jun/24 10:30
 

Some investigation:

  • WikiModel doesn't support ending nested lists. It only supports ending the whole list. List handling seems to be deep in some list balancing code, I didn't dig deep enough if we could somehow force it to produce the end event early but I have the impression that this could be possible. In theory we would also want to wrap the whole content in a group syntax but that's impossible to detect without a heavy lookahead that we currently don't have.
  • I would be quite surprised if the XWiki syntax renderer handled this situation correctly even with a correct XDOM unless the XDOM would wrap the content after the nested list in a paragraph but I didn't test that part yet.

A rendering test to reproduce at least the parser side:

.#-----------------------------------------------------
.inputexpect|xhtml/1.0
.#-----------------------------------------------------
<ul><li>foo<ul><li>bar</li></ul>after</li></ul>
.#-----------------------------------------------------
.expect|event/1.0
.#-----------------------------------------------------
beginDocument
beginList [BULLETED]
beginListItem
onWord [foo]
beginList [BULLETED]
beginListItem
onWord [bar]
endListItem
endList [BULLETED]
onWord [after]
endListItem
endList [BULLETED]
endDocument