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

Function startRubySplat

static/editor.md/lib/codemirror/mode/slim/slim.js:152–172  ·  view source on GitHub ↗
(tokenize)

Source from the content-addressed store, hash-verified

150 };
151 }
152 function startRubySplat(tokenize) {
153 var rubyState;
154 var runSplat = function(stream, state) {
155 if (state.rubyState.tokenize.length == 1 && !state.rubyState.context.prev) {
156 stream.backUp(1);
157 if (stream.eatSpace()) {
158 state.rubyState = rubyState;
159 state.tokenize = tokenize;
160 return tokenize(stream, state);
161 }
162 stream.next();
163 }
164 return ruby(stream, state);
165 };
166 return function(stream, state) {
167 rubyState = state.rubyState;
168 state.rubyState = rubyMode.startState();
169 state.tokenize = runSplat;
170 return ruby(stream, state);
171 };
172 }
173
174 function ruby(stream, state) {
175 return rubyMode.token(stream, state.rubyState);

Callers 5

attributeWrapperValueFunction · 0.85
slimTagFunction · 0.85
slimAttributeFunction · 0.85
slimAttributeValueFunction · 0.85
slimAttributeSymbolsFunction · 0.85

Calls 1

rubyFunction · 0.70

Tested by

no test coverage detected