fix: format element list boundary error #367
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user