Context
Currently the reference lists use getTopLevelKeysInReflistOrder in MWGroupReferences. MWGroupReferences builds an index for refs and subrefs using mainRefKey. That needs to change. We need to do something similar but with the mainListIndex only.
Task
- Build the search results correctly independent of main ref nodes in main+details cases
- Make sure the main content can be seen independent of main ref nodes in main+details cases
Note that the old reference list implementation in ve.dm.MWGroupReferences has the side effect of calling setGroupIndex on every reference node, to wire footnote numbers from the reflist back into the footnote markers. If we merge the code here without reimplementing that side effect, then we'll have two separate algorithms responsible for numbering the markers vs. the reflist. It's best if we can solve this side-effect before merging the reflist change.