There is 1 update, 1 comment.
 
 
XWiki Rendering / cid:jira-generated-image-avatar-b9edb11b-fef2-4c71-8684-2590460ae8b6 XRENDERING-744 Open

Nested lists with paragraphs are incorrectly rendered and cause NPEs

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-f72435a7-0367-4051-98cf-99b52935aaac Changes by Michael Hamann on 13/Jun/24 17:15
 
Assignee: Michael Hamann
 
 

1 comment

 
cid:jira-generated-image-avatar-f72435a7-0367-4051-98cf-99b52935aaac Michael Hamann on 13/Jun/24 17:14
 

I think I understand what happens. Lists that are wrapped in other list items are not "block handlers" as they don't require, e.g., a nested document tag. However, as, when the inner list starts, we are directly inside the created group syntax, we are not in a block context when the paragraph is opened. Therefore, the paragraph tag handler doesn't trigger the opening of a nested document. In the InternalWikiScannerContext the opening of the paragraph then closes the list before opening the paragraph.

I think the correct thing to do is to consider lists as block handlers if a nested document tag was opened. This fixes this example for me. I'll open a pull request. I still need to check the null pointer if that has been fixed in the meantime as I didn't reproduce it.