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

Function maybePopContext

static/editor.md/lib/codemirror/mode/xml/xml.js:196–209  ·  view source on GitHub ↗
(state, nextTagName)

Source from the content-addressed store, hash-verified

194 if (state.context) state.context = state.context.prev;
195 }
196 function maybePopContext(state, nextTagName) {
197 var parentTagName;
198 while (true) {
199 if (!state.context) {
200 return;
201 }
202 parentTagName = state.context.tagName;
203 if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||
204 !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
205 return;
206 }
207 popContext(state);
208 }
209 }
210
211 function baseState(type, stream, state) {
212 if (type == "openTag") {

Callers 1

attrStateFunction · 0.85

Calls 1

popContextFunction · 0.70

Tested by

no test coverage detected