(dom, text)
| 5 | var Pos = CodeMirror.Pos |
| 6 | |
| 7 | function findTextNode(dom, text) { |
| 8 | if (dom instanceof CodeMirror) dom = dom.getInputField() |
| 9 | if (dom.nodeType == 1) { |
| 10 | for (var ch = dom.firstChild; ch; ch = ch.nextSibling) { |
| 11 | var found = findTextNode(ch, text) |
| 12 | if (found) return found |
| 13 | } |
| 14 | } else if (dom.nodeType == 3 && dom.nodeValue == text) { |
| 15 | return dom |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | function lineElt(node) { |
| 20 | for (;;) { |
no outgoing calls
no test coverage detected