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

Function tokenRawString

static/editor.md/lib/codemirror/mode/clike/clike.js:247–256  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

245 // C++11 raw string literal is <prefix>"<delim>( anything )<delim>", where
246 // <delim> can be a string up to 16 characters long.
247 function tokenRawString(stream, state) {
248 // Escape characters that have special regex meanings.
249 var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&');
250 var match = stream.match(new RegExp(".*?\\)" + delim + '"'));
251 if (match)
252 state.tokenize = null;
253 else
254 stream.skipToEnd();
255 return "string";
256 }
257
258 function def(mimes, mode) {
259 if (typeof mimes == "string") mimes = [mimes];

Callers 1

cpp11StringHookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected