fix: format list elements boundary error

This commit is contained in:
Hufe921
2024-04-07 22:42:22 +08:00
parent a546262b9d
commit 21807a6f7e
+2 -1
View File
@@ -68,9 +68,10 @@ export function formatElementList(
...options ...options
} }
const startElement = elementList[0] const startElement = elementList[0]
// 非首字符零宽节点文本元素则补偿 // 非首字符零宽节点文本元素则补偿-列表元素内部会补偿此处忽略
if ( if (
isHandleFirstElement && isHandleFirstElement &&
startElement?.type !== ElementType.LIST &&
((startElement?.type && startElement.type !== ElementType.TEXT) || ((startElement?.type && startElement.type !== ElementType.TEXT) ||
!START_LINE_BREAK_REG.test(startElement?.value)) !START_LINE_BREAK_REG.test(startElement?.value))
) { ) {