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

Function blockLanguage

docs/assets/highlight.js:49–58  ·  view source on GitHub ↗
(block)

Source from the content-addressed store, hash-verified

47 }
48
49 function blockLanguage(block) {
50 var classes = block.className.split(/\s+/)
51 classes = classes.concat(block.parentNode.className.split(/\s+/));
52 for (var i = 0; i < classes.length; i++) {
53 var class_ = classes[i].replace(/^language-/, '');
54 if (languages[class_] || class_ == 'no-highlight') {
55 return class_;
56 }
57 }
58 }
59
60 /* Stream merging */
61

Callers 1

highlightBlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected