Skip to content

Commit 10e5e5e

Browse files
authored
fix(prefixIds): sameline comments (#1942)
1 parent 7882488 commit 10e5e5e

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ coverage
1515
.DS_Store
1616
.vscode
1717
*.log
18+
19+
# https://github.com/github/gitignore/blob/main/Global/Vim.gitignore
20+
[._]*.s[a-v][a-z]
21+
!*.svg # comment out if you don't need vector files
22+
[._]*.sw[a-p]
23+
[._]s[a-rt-v][a-z]
24+
[._]ss[a-gi-z]
25+
[._]sw[a-p]

plugins/prefixIds.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ export const fn = (_root, params, info) => {
183183
});
184184

185185
child.value = csstree.generate(cssAst);
186-
return;
187186
}
188187
}
189188

test/plugins/prefixIds.13.svg.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Prefix IDs should apply to all nodes in styles, namely when styles are split
2+
into multiple nodes due to XML comments.
3+
4+
===
5+
6+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1">
7+
<style>
8+
<!-- uwu -->
9+
#a13 {} <!-- xyz -->
10+
#b13 {}
11+
</style>
12+
</svg>
13+
14+
@@@
15+
16+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1">
17+
<style>
18+
<!--uwu-->
19+
#prefixIds_13_svg_txt__a13{}
20+
<!--xyz-->
21+
#prefixIds_13_svg_txt__b13{}
22+
</style>
23+
</svg>

0 commit comments

Comments
 (0)