MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / getColorTokenRegex

Function getColorTokenRegex

lib/utilities/markdown-color.js:157–167  ·  view source on GitHub ↗
(name, options)

Source from the content-addressed store, hash-verified

155 @return {RegExp} Returns lookup pattern
156*/
157function getColorTokenRegex(name, options) {
158 options = options || {};
159 let start = options.start || '(?:<';
160 let end = options.end || '>)';
161 let close = options.close || '(?:</';
162 let middle = options.middle || '(.*?)';
163 let tag = start + name + end;
164 let closeTag = close + name + end;
165 let pattern = tag + middle + closeTag;
166 return new RegExp(pattern, 'g');
167}
168
169/*
170 @param {String} [name]

Callers 1

getTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…