We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d918675 commit b10349dCopy full SHA for b10349d
src/lib/snipTagContent.ts
@@ -16,7 +16,7 @@ export function snipScriptAndStyleTagContent(source: string): string {
16
const indexes: [number, number][] = [];
17
let match = null;
18
while ((match = regex.exec(source)) != null) {
19
- if (!source.substr(match.index, 10).startsWith('<!--')) {
+ if (source.slice(match.index, match.index + 4) !== '<!--') {
20
indexes.push([match.index, regex.lastIndex]);
21
}
22
0 commit comments