(prev, next)
| 5501 | |
| 5502 | |
| 5503 | const canCombine = (prev, next) => { |
| 5504 | if (createClass(prev.classes) !== createClass(next.classes) || prev.skew !== next.skew || prev.maxFontSize !== next.maxFontSize) { |
| 5505 | return false; |
| 5506 | } |
| 5507 | |
| 5508 | for (const style in prev.style) { |
| 5509 | if (prev.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) { |
| 5510 | return false; |
| 5511 | } |
| 5512 | } |
| 5513 | |
| 5514 | for (const style in next.style) { |
| 5515 | if (next.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) { |
| 5516 | return false; |
| 5517 | } |
| 5518 | } |
| 5519 | |
| 5520 | return true; |
| 5521 | }; |
| 5522 | /** |
| 5523 | * Combine consequetive domTree.symbolNodes into a single symbolNode. |
| 5524 | * Note: this function mutates the argument. |
no test coverage detected