Context
When users use something like the {{reflist}} template we can not rely on getting the body content from a synthetic main ref node while converting the Parsoid nodes in the DOMtoData step.
Solution
We should find a way to retrieve the body content directly from the document's DOM when converting a sub-ref so that we can be independent of expecting a main ref node.
Task
- Find a way to match main refs in the DOM from sub-refs ( could already be solved with the mainBodyId )
- Create an InternalNodeItem from that content getting the right listIndex from queueItemHtml
- Make sure that this works even if single main node is found converted later