fix(core): indexer worker crash on unexpected markdown indent (#9210)
This commit is contained in:
@@ -433,7 +433,8 @@ function unindentMarkdown(markdown: string) {
|
|||||||
current = current.trimStart();
|
current = current.trimStart();
|
||||||
} else {
|
} else {
|
||||||
// For subsequent list items, maintain relative indentation
|
// For subsequent list items, maintain relative indentation
|
||||||
current = ' '.repeat(indent - baseIndent) + current.trimStart();
|
current =
|
||||||
|
' '.repeat(Math.max(0, indent - baseIndent)) + current.trimStart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user