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

Function inlineRE

static/editor.md/lib/codemirror/mode/markdown/markdown.js:631–640  ·  view source on GitHub ↗
(endChar)

Source from the content-addressed store, hash-verified

629
630 var savedInlineRE = [];
631 function inlineRE(endChar) {
632 if (!savedInlineRE[endChar]) {
633 // Escape endChar for RegExp (taken from http://stackoverflow.com/a/494122/526741)
634 endChar = (endChar+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
635 // Match any non-endChar, escaped character, as well as the closing
636 // endChar.
637 savedInlineRE[endChar] = new RegExp('^(?:[^\\\\]|\\\\.)*?(' + endChar + ')');
638 }
639 return savedInlineRE[endChar];
640 }
641
642 var mode = {
643 startState: function() {

Callers 1

getLinkHrefInsideFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected