We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f34f75 commit 3360673Copy full SHA for 3360673
scripts/test-utils/format-html.ts
@@ -39,12 +39,13 @@ export function formatHTML(src: string): string {
39
const styleMatch = src.slice(pos).match(/<style([\s\S]*?)>([\s\S]*?)<\/style>/);
40
if (styleMatch) {
41
// opening tag
42
- const [, attrs, textContent] = styleMatch;
+ const [wholeMatch, attrs, textContent] = styleMatch;
43
res += getPadding() + `<style${attrs}>` + '\n';
44
depth++;
45
res += getPadding() + textContent + '\n';
46
depth--;
47
res += getPadding() + '</style>' + '\n';
48
+ pos = pos + wholeMatch.length;
49
continue;
50
}
51
0 commit comments