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

Function slimAttributeValue

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

Source from the content-addressed store, hash-verified

426 }
427
428 function slimAttributeValue(stream, state) {
429 var ch = stream.peek();
430 if (ch == '"' || ch == "\'") {
431 state.tokenize = readQuoted(ch, "string", true, false, slimAttribute);
432 stream.next();
433 return state.tokenize(stream, state);
434 }
435 if (ch == '[') {
436 return startRubySplat(slimAttribute)(stream, state);
437 }
438 if (ch == ':') {
439 return startRubySplat(slimAttributeSymbols)(stream, state);
440 }
441 if (stream.match(/^(true|false|nil)\b/)) {
442 state.tokenize = slimAttribute;
443 return "keyword";
444 }
445 return startRubySplat(slimAttribute)(stream, state);
446 }
447 function slimAttributeSymbols(stream, state) {
448 stream.backUp(1);
449 if (stream.match(/^[^\s],(?=:)/)) {

Callers

nothing calls this directly

Calls 2

startRubySplatFunction · 0.85
readQuotedFunction · 0.70

Tested by

no test coverage detected