Enhancement
OpenXmlMarkupService.LocateParagraph returns the first paragraph that contains charStart and never considers charStart + span.Length. Spans that legitimately cross a paragraph boundary (e.g. a sentence rule that matches across a soft break, a heading + first body sentence) are silently truncated to the first paragraph.
Location: src/LambdaRag.Markup/OpenXmlMarkupService.cs LocateParagraph (~line 197)
Expected behaviour options (pick one in implementation):
- Locate both start and end paragraphs; emit a single comment whose range crosses paragraphs (OOXML supports this —
CommentRangeStart in P1, CommentRangeEnd in P2).
- Reject cross-paragraph spans with a logged warning and a typed
AnnotationApplicationFailure outcome rather than silent fallback.
Acceptance criteria
Enhancement
OpenXmlMarkupService.LocateParagraphreturns the first paragraph that containscharStartand never considerscharStart + span.Length. Spans that legitimately cross a paragraph boundary (e.g. a sentence rule that matches across a soft break, a heading + first body sentence) are silently truncated to the first paragraph.Location:
src/LambdaRag.Markup/OpenXmlMarkupService.csLocateParagraph(~line 197)Expected behaviour options (pick one in implementation):
CommentRangeStartin P1,CommentRangeEndin P2).AnnotationApplicationFailureoutcome rather than silent fallback.Acceptance criteria