storybook-addon-html
storybook-addon-html copied to clipboard
How to remove Lit HTML comments?
When working with Lit components you will find HTML code like this ⬇️
<my-button>
<!--?lit$7082895866$-->
<!--?lit$7082895866$-->Primary Button
<!--?lit$7082895866$-->
</my-button>
How should we support a way to remove those comments here?
Thanks 🤗
i have the same problem
this regex /g, not work
Maybe we could this regex to get rid of every HTML comment no matter what's inside?

I have created a PR for that change https://github.com/whitespace-se/storybook-addon-html/pull/66 🐣
I think a regex or filter callback is the way to go. Me and the other developers at Whitespace are planning to do some maintenance (go through issues and merge PRs) this and next week. Thank you for your patience!
It's now possible to define what comments to remove with the removeComments
parameter and providing a regular expression. I hope it solves this issue for you!