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

Function closeTagNameState

static/editor.md/lib/codemirror/mode/xml/xml.js:231–248  ·  view source on GitHub ↗
(type, stream, state)

Source from the content-addressed store, hash-verified

229 }
230 }
231 function closeTagNameState(type, stream, state) {
232 if (type == "word") {
233 var tagName = stream.current();
234 if (state.context && state.context.tagName != tagName &&
235 Kludges.implicitlyClosed.hasOwnProperty(state.context.tagName))
236 popContext(state);
237 if (state.context && state.context.tagName == tagName) {
238 setStyle = "tag";
239 return closeState;
240 } else {
241 setStyle = "tag error";
242 return closeStateErr;
243 }
244 } else {
245 setStyle = "error";
246 return closeStateErr;
247 }
248 }
249
250 function closeState(type, _stream, state) {
251 if (type != "endTag") {

Callers

nothing calls this directly

Calls 1

popContextFunction · 0.70

Tested by

no test coverage detected