MCPcopy Index your code
hub / github.com/documentcloud/visualsearch / findCode

Function findCode

docs/assets/highlight.js:21–29  ·  view source on GitHub ↗
(pre)

Source from the content-addressed store, hash-verified

19 }
20
21 function findCode(pre) {
22 for (var i = 0; i < pre.childNodes.length; i++) {
23 var node = pre.childNodes[i];
24 if (node.nodeName == 'CODE')
25 return node;
26 if (!(node.nodeType == 3 && node.nodeValue.match(/\s+/)))
27 break;
28 }
29 }
30
31 function blockText(block, ignoreNewLines) {
32 var result = '';

Callers 1

initHighlightingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected