fix: format element list boundary error #367

pr675
Hufe921 2 years ago
parent d83fc0f37a
commit 7a6f656699

@ -57,10 +57,11 @@ export function formatElementList(
...options
}
const startElement = elementList[0]
// 非首字符零宽节点文本元素则补偿
if (
isHandleFirstElement &&
startElement?.value !== ZERO &&
startElement?.value !== '\n'
((startElement?.type && startElement.type !== ElementType.TEXT) ||
(startElement?.value !== ZERO && startElement?.value !== '\n'))
) {
elementList.unshift({
value: ZERO

Loading…
Cancel
Save