fix: add length check after trailing newline pop in BlockAnchorReplacer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>pull/14629/head
parent
13616e3459
commit
6425531d96
|
|
@ -236,6 +236,10 @@ export const BlockAnchorReplacer: Replacer = function* (content, find) {
|
|||
searchLines.pop()
|
||||
}
|
||||
|
||||
if (searchLines.length < 3) {
|
||||
return
|
||||
}
|
||||
|
||||
const firstLineSearch = searchLines[0].trim()
|
||||
const lastLineSearch = searchLines[searchLines.length - 1].trim()
|
||||
const searchBlockSize = searchLines.length
|
||||
|
|
|
|||
Loading…
Reference in New Issue