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

Function doReplace

static/editor.md/lib/codemirror/addon/search/search.js:147–151  ·  view source on GitHub ↗
(match)

Source from the content-addressed store, hash-verified

145 [function() {doReplace(match);}, advance]);
146 };
147 var doReplace = function(match) {
148 cursor.replace(typeof query == "string" ? text :
149 text.replace(/\$(\d)/g, function(_, i) {return match[i];}));
150 advance();
151 };
152 advance();
153 }
154 });

Callers 1

advanceFunction · 0.85

Calls 1

advanceFunction · 0.70

Tested by

no test coverage detected