5b1: report the line a paragraph's kept text starts on, and stream the source lines
CI / gate (push) Successful in 8s

This commit is contained in:
2026-09-03 17:24:46 +02:00
parent 8a88c50630
commit 7bb4d78266
5 changed files with 36 additions and 18 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ for (const name of pairedNames(normalizationRoot, '.md', '.json')) {
})
}
// The position the input itself gives an offset: undefined where the offset starts no line.
// The position the input itself gives an offset, recomputed rather than trusted from the parser.
function lineStarting(markdown: string, offset: number): { line: number; offset: number } | undefined {
const before = markdown.slice(0, offset)
if (offset !== 0 && !/(?:\r\n|[\n\r])$/.test(before)) return undefined