Review comments
This commit is contained in:
@@ -76,6 +76,12 @@ class ChapterXPathIndexer {
|
||||
* @param paragraphIndex 1-based paragraph index (from section LUT or XPath p[N])
|
||||
* @param seekHint Optional XHTML byte offset to start scanning from (0 = from beginning).
|
||||
* Pass Section::getXhtmlByteOffsetForPage() to avoid scanning the whole file.
|
||||
* @param startParagraphCount Optional seed count (default 0) of direct-body-child <p> elements
|
||||
* that precede the seekHint position. Should be provided when seekHint > 0 to
|
||||
* avoid counting from scratch mid-document; callers should pass the paragraph
|
||||
* index of the LUT entry at the seek page minus 1. If the partial parse with
|
||||
* this seed doesn't find the target, the function falls back to runParse from
|
||||
* byte 0 and re-counts with startParagraphCount = 0.
|
||||
* @return Full-ancestry XPath like "/body/DocFragment[N]/body/div[1]/p[3]", or empty on failure
|
||||
*/
|
||||
static std::string findXPathForParagraph(const std::shared_ptr<Epub>& epub, int spineIndex, uint16_t paragraphIndex,
|
||||
|
||||
Reference in New Issue
Block a user