Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ coverage
.DS_Store
.vscode
*.log

# https://github.com/github/gitignore/blob/main/Global/Vim.gitignore
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
1 change: 0 additions & 1 deletion plugins/prefixIds.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ export const fn = (_root, params, info) => {
});

child.value = csstree.generate(cssAst);
return;
}
}

Expand Down
23 changes: 23 additions & 0 deletions test/plugins/prefixIds.13.svg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Prefix IDs should apply to all nodes in styles, namely when styles are split
into multiple nodes due to XML comments.

===

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1">
<style>
<!-- uwu -->
#a13 {} <!-- xyz -->
#b13 {}
</style>
</svg>

@@@

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1">
<style>
<!--uwu-->
#prefixIds_13_svg_txt__a13{}
<!--xyz-->
#prefixIds_13_svg_txt__b13{}
</style>
</svg>