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

Function attrState

static/editor.md/lib/codemirror/mode/xml/xml.js:263–281  ·  view source on GitHub ↗
(type, _stream, state)

Source from the content-addressed store, hash-verified

261 }
262
263 function attrState(type, _stream, state) {
264 if (type == "word") {
265 setStyle = "attribute";
266 return attrEqState;
267 } else if (type == "endTag" || type == "selfcloseTag") {
268 var tagName = state.tagName, tagStart = state.tagStart;
269 state.tagName = state.tagStart = null;
270 if (type == "selfcloseTag" ||
271 Kludges.autoSelfClosers.hasOwnProperty(tagName)) {
272 maybePopContext(state, tagName);
273 } else {
274 maybePopContext(state, tagName);
275 state.context = new Context(state, tagName, tagStart == state.indented);
276 }
277 return baseState;
278 }
279 setStyle = "error";
280 return attrState;
281 }
282 function attrEqState(type, stream, state) {
283 if (type == "equals") return attrValueState;
284 if (!Kludges.allowMissing) setStyle = "error";

Callers 3

attrEqStateFunction · 0.85
attrValueStateFunction · 0.85
attrContinuedStateFunction · 0.85

Calls 1

maybePopContextFunction · 0.85

Tested by

no test coverage detected