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

Function tokenString

static/editor.md/lib/codemirror/mode/velocity/velocity.js:129–147  ·  view source on GitHub ↗
(quote)

Source from the content-addressed store, hash-verified

127 }
128
129 function tokenString(quote) {
130 return function(stream, state) {
131 var escaped = false, next, end = false;
132 while ((next = stream.next()) != null) {
133 if ((next == quote) && !escaped) {
134 end = true;
135 break;
136 }
137 if (quote=='"' && stream.peek() == '$' && !escaped) {
138 state.inString = true;
139 end = true;
140 break;
141 }
142 escaped = !escaped && next == "\\";
143 }
144 if (end) state.tokenize = tokenBase;
145 return "string";
146 };
147 }
148
149 function tokenComment(stream, state) {
150 var maybeEnd = false, ch;

Callers 1

tokenBaseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected