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

Function doctype

static/editor.md/lib/codemirror/mode/xml/xml.js:164–183  ·  view source on GitHub ↗
(depth)

Source from the content-addressed store, hash-verified

162 };
163 }
164 function doctype(depth) {
165 return function(stream, state) {
166 var ch;
167 while ((ch = stream.next()) != null) {
168 if (ch == "<") {
169 state.tokenize = doctype(depth + 1);
170 return state.tokenize(stream, state);
171 } else if (ch == ">") {
172 if (depth == 1) {
173 state.tokenize = inText;
174 break;
175 } else {
176 state.tokenize = doctype(depth - 1);
177 return state.tokenize(stream, state);
178 }
179 }
180 }
181 return "meta";
182 };
183 }
184
185 function Context(state, tagName, startOfLine) {
186 this.prev = state.context;

Callers 1

inTextFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected