Skip to content

Commit e0ac739

Browse files
committed
fix: RT-258 skip span tag if it des not have any attributes
1 parent 52ec23e commit e0ac739

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/fromRedactor.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,9 @@ export const fromRedactor = (el: any, options?:IHtmlToJsonOptions) : IAnyObject
832832
uid: generateId()
833833
}
834834
}
835+
if (noOfInlineElement === el.parentNode?.childNodes.length && Array.from(el.attributes).length === 0) {
836+
return children
837+
}
835838
}
836839

837840
if (children.length === 0) {

0 commit comments

Comments
 (0)