MCPcopy Index your code
hub / github.com/Acode-Foundation/Acode / escapeRegExp

Function escapeRegExp

src/utils/codeHighlight.js:26–28  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

24}
25
26function escapeRegExp(string) {
27 return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
28}
29
30function addSymbolHighlight(html, symbol) {
31 if (!symbol) return html;

Callers 1

addSymbolHighlightFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected