(yText: Y.XmlText)
| 13 | } |
| 14 | |
| 15 | export function cloneDeep(yText: Y.XmlText): Y.XmlText { |
| 16 | const clone = new Y.XmlText() |
| 17 | |
| 18 | const attributes = yText.getAttributes() |
| 19 | Object.entries(attributes).forEach(([key, value]) => { |
| 20 | clone.setAttribute(key, value) |
| 21 | }) |
| 22 | |
| 23 | clone.applyDelta(cloneInsertDeltaDeep(yTextToInsertDelta(yText)), { |
| 24 | sanitize: false, |
| 25 | }) |
| 26 | |
| 27 | return clone |
| 28 | } |
no test coverage detected
searching dependent graphs…