MCPcopy Create free account
hub / github.com/TruthHun/BookStack / indexOf

Function indexOf

static/editor.md/lib/codemirror/addon/edit/closetag.js:139–144  ·  view source on GitHub ↗
(collection, elt)

Source from the content-addressed store, hash-verified

137 CodeMirror.commands.closeTag = function(cm) { return autoCloseCurrent(cm); };
138
139 function indexOf(collection, elt) {
140 if (collection.indexOf) return collection.indexOf(elt);
141 for (var i = 0, e = collection.length; i < e; ++i)
142 if (collection[i] == elt) return i;
143 return -1;
144 }
145
146 // If xml-fold is loaded, we use its functionality to try and verify
147 // whether a given tag is actually unclosed.

Callers 1

autoCloseGTFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected