MCPcopy Index your code
hub / github.com/angular/angular / unescapeQuotes

Function unescapeQuotes

packages/compiler/src/shadow_css.ts:1220–1222  ·  view source on GitHub ↗

* Unescape all quotes present in a string, but only if the string was actually already * quoted. * * This generates a "canonical" representation of strings which can be used to match strings * which would otherwise only differ because of differently escaped quotes. * * For example it converts

(str: string, isQuoted: boolean)

Source from the content-addressed store, hash-verified

1218 * @returns the string in the "canonical" representation without escaped quotes.
1219 */
1220function unescapeQuotes(str: string, isQuoted: boolean): string {
1221 return !isQuoted ? str : str.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g, '$1');
1222}
1223
1224/**
1225 * Combine the `contextSelectors` with the `hostMarker` and the `otherSelectors`

Callers 2

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…