(blockElement: HTMLElement)
| 129 | }; |
| 130 | |
| 131 | const getMathBlockText = (blockElement: HTMLElement) => { |
| 132 | const binding = bindings.get(blockElement); |
| 133 | if (binding) { |
| 134 | return binding.view.state.doc.toString(); |
| 135 | } |
| 136 | const parts = getBlockParts(blockElement); |
| 137 | return parts?.code.textContent ?? ""; |
| 138 | }; |
| 139 | |
| 140 | export const isMathBlockEmpty = (blockElement: HTMLElement) => { |
| 141 | return getMathBlockText(blockElement).trim() === ""; |
no test coverage detected