Closed yannickoo closed 1 year ago
Thanks for the PR, but can you please add another parameter for this? removeEmptyComments
doesn’t make sense since they are not empty. My suggestion would be to add a parameter called removeComments
which can take true
to remove all comments or a regular expression to remove just the once you want that match it:
// .storybook/preview.js
export const parameters = {
// ...
html: {
removeComments: /^\$lit\$.*|\s*/ // This removes Lit comments and empty comments.
},
};
Then we can deprecate removeEmptyComments
.
Thanks for the PR, but can you please add another parameter for this?
removeEmptyComments
doesn’t make sense since they are not empty. My suggestion would be to add a parameter calledremoveComments
which can taketrue
to remove all comments or a regular expression to remove just the once you want that match it:// .storybook/preview.js export const parameters = { // ... html: { removeComments: /^\$lit\$.*|\s*/ // This removes Lit comments and empty comments. }, };
Then we can deprecate
removeEmptyComments
.
@jeanfredrik I have created PR #73 providing the changes recommended in your comment.
This PR adjusts the regex so all HTML comments will be replaced.