MCPcopy Create free account
hub / github.com/CoderOpen/waimai / edit

Function edit

front/components/marked/lib/marked.js:1299–1313  ·  view source on GitHub ↗
(regex, opt)

Source from the content-addressed store, hash-verified

1297}
1298
1299function edit(regex, opt) {
1300 regex = regex.source || regex;
1301 opt = opt || '';
1302 return {
1303 replace: function(name, val) {
1304 val = val.source || val;
1305 val = val.replace(/(^|[^\[])\^/g, '$1');
1306 regex = regex.replace(name, val);
1307 return this;
1308 },
1309 getRegex: function() {
1310 return new RegExp(regex, opt);
1311 }
1312 };
1313}
1314
1315function resolveUrl(base, href) {
1316 if (!baseUrls[' ' + base]) {

Callers 1

marked.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected