(html: string, match: TagMatch, newTag: string)
| 232 | } |
| 233 | |
| 234 | function replaceTagAtMatch(html: string, match: TagMatch, newTag: string): string { |
| 235 | return `${html.slice(0, match.start)}${newTag}${html.slice(match.end)}`; |
| 236 | } |
| 237 | |
| 238 | function execDataAttrPattern(html: string, attr: string, value: string): TagMatch | null { |
| 239 | const pattern = new RegExp(`(<[^>]*\\b${attr}=(["'])${escapeRegex(value)}\\2[^>]*)>`, "i"); |
no outgoing calls
no test coverage detected