mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
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();
|
||||
} else {
|
||||
// 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