Positions, not HTMLfindRanges and toSegments return plain data, so React and other frameworks render matches without dangerouslySetInnerHTML.