Quote:
Originally Posted by Barty
The idea is to lazily tweak CSS.
|
If
selection is
Some(Selection { start: TextLocation::Dynamic(offset), .. }), then
offset is an absolute byte offset that refers to a particular position in the spine seen as a continuous byte stream.
You can find the underlying vertebra using
EpubDocument::vertebra_coordinates. You'll then need to parse that file as XML and find the element with the biggest byte offset less or equal to
offset - start_offset.
I guess you'll also have to store the additional rules in the reading state.