fix: format element list boundary error #367

pr675
Hufe921 2 years ago
parent d83fc0f37a
commit 7a6f656699

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

Loading…
Cancel
Save