MCPcopy Index your code
hub / github.com/postcss/postcss / escapeHTMLInCSS

Function escapeHTMLInCSS

lib/stringifier.js:9–13  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

7const COMMENT_OPEN = /(<)(!--)/g
8
9function escapeHTMLInCSS(str) {
10 if (typeof str !== 'string') return str
11 if (!str.includes('<')) return str
12 return str.replace(STYLE_TAG, '\\3c $2').replace(COMMENT_OPEN, '\\3c $2')
13}
14
15const DEFAULT_RAW = {
16 after: '\n',

Callers 7

atruleMethod · 0.85
blockMethod · 0.85
bodyMethod · 0.85
commentMethod · 0.85
declMethod · 0.85
rootMethod · 0.85
ruleMethod · 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…