yshavit / mdq

MIT License
1 stars 0 forks source link

add a new MdElemRef::Doc #83

Closed yshavit closed 1 week ago

yshavit commented 1 week ago

This lets us encapsulate a Vec<MdElem> that represents a single area of the doc, as opposed to a stream of disparate areas.

Note that we don't need a new MdElem variant, just a new MdElemRef variant. This is consistent with the code's existing pattern that MdElem is just the structure, and MdElemRef is various slices into that structure.

This also lets us simplify the SelectResult, since each selector now returns exactly one element (previously, there was a Multi case for SectionSelector, but now that's just a single Doc).

This resolves #79.