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

Function sub

static/editor.md/lib/codemirror/mode/slim/slim.js:278–291  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

276 }
277
278 function sub(stream, state) {
279 if (stream.match(/^#\{/)) {
280 state.tokenize = rubyInQuote("}", state.tokenize);
281 return null;
282 }
283 var subStream = new CodeMirror.StringStream(stream.string.slice(state.stack.indented), stream.tabSize);
284 subStream.pos = stream.pos - state.stack.indented;
285 subStream.start = stream.start - state.stack.indented;
286 subStream.lastColumnPos = stream.lastColumnPos - state.stack.indented;
287 subStream.lastColumnValue = stream.lastColumnValue - state.stack.indented;
288 var style = state.subMode.token(subStream, state.subState);
289 stream.pos = subStream.pos + state.stack.indented;
290 return style;
291 }
292 function firstSub(stream, state) {
293 state.stack.indented = stream.column();
294 state.line = state.tokenize = sub;

Callers

nothing calls this directly

Calls 1

rubyInQuoteFunction · 0.70

Tested by

no test coverage detected