([n, p]: NodeEntry)
| 82 | |
| 83 | const matches: NodeEntry[] = [] |
| 84 | const matcher = ([n, p]: NodeEntry) => { |
| 85 | const isRoot = p.length === 0 |
| 86 | if (isRoot) { |
| 87 | return false |
| 88 | } |
| 89 | |
| 90 | if (isBlockEmpty) { |
| 91 | return true |
| 92 | } |
| 93 | |
| 94 | if ( |
| 95 | mergeStart && |
| 96 | Path.isAncestor(p, firstPath) && |
| 97 | Element.isElement(n) && |
| 98 | !editor.isGrid(n) && |
| 99 | !editor.isVoid(n) && |
| 100 | !editor.isInline(n) |
| 101 | ) { |
| 102 | return false |
| 103 | } |
| 104 | |
| 105 | if ( |
| 106 | mergeEnd && |
| 107 | Path.isAncestor(p, lastPath) && |
| 108 | Element.isElement(n) && |
| 109 | !editor.isGrid(n) && |
| 110 | !editor.isVoid(n) && |
| 111 | !editor.isInline(n) |
| 112 | ) { |
| 113 | return false |
| 114 | } |
| 115 | |
| 116 | return true |
| 117 | } |
| 118 | |
| 119 | for (const entry of Node.nodes({ children: fragment }, { pass: matcher })) { |
| 120 | if (matcher(entry)) { |
no outgoing calls
no test coverage detected
searching dependent graphs…