MCPcopy Create free account
hub / github.com/angular/angular / unescapeInStrings

Function unescapeInStrings

packages/compiler/src/shadow_css.ts:1225–1230  ·  view source on GitHub ↗

* Replace in a string all occurrences of keys in the `ESCAPE_IN_STRING_MAP` map with their * original representation, this is simply used to revert the changes applied by the * escapeInStrings function. * * For example it reverts the text: * `animation: "my-anim%COLON_IN_PLACEHOLDER%at\"ion" 1

(input: string)

Source from the content-addressed store, hash-verified

1223 * @returns the css text without the placeholders.
1224 */
1225function unescapeInStrings(input: string): string {
1226 let result = input.replace(_cssCommaInPlaceholderReGlobal, ',');
1227 result = result.replace(_cssSemiInPlaceholderReGlobal, ';');
1228 result = result.replace(_cssColonInPlaceholderReGlobal, ':');
1229 return result;
1230}
1231
1232/**
1233 * Unescape all quotes present in a string, but only if the string was actually already

Callers 1

processRulesFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected