The leading-blank-line offset fix highlights a contract that becomes important when cleaning is enabled. Normalizing CRLF, unescaping HTML entities, and rejoining hyphenated lines can all change character positions. A boundary can be correct in cleaned text while pointing to the wrong place in the original document.
I would make the coordinate space explicit for detect() and for hook boundaries, and preserve an offset map if callers need to annotate the original source. A round-trip test using leading blanks, CRLF, and an entity before the first boundary would expose that distinction. This matters especially for PDF or OCR consumers that attach annotations using the returned offsets.