Skip to content

Commit eb88c64

Browse files
committed
fix: kebab-case attribute filtering
1 parent 4c47ca2 commit eb88c64

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ const getContent = (
3434
const propertiesKeys = Object.keys(block.propertiesTextValues);
3535
const contentArray = data.text!.split("\n");
3636
const pureContentArray = contentArray.filter((item) => {
37-
return !propertiesKeys.some((key) => item.trim().startsWith(`${key}::`));
37+
return !propertiesKeys.some((key) => {
38+
const kebabKey = key.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();
39+
const trimmedItem = item.trim();
40+
return trimmedItem.startsWith(`${kebabKey}::`);
41+
});
3842
});
3943
data.text = pureContentArray.join("\n");
4044
}

0 commit comments

Comments
 (0)