[英]How to strip all the class (CSS) attributes in a HTML file in vscode?
I am creating email templates in HTML.我在 HTML 中创建 email 模板。 I am using classes to style components during development.
我在开发过程中使用类来设置组件的样式。 I want to strip all
class
attributes before shipping the final version.我想在发布最终版本之前删除所有
class
属性。 How to achieve it in VSCODE?如何在 VSCODE 中实现?
I tried selecting all occurances of the word class
, but the length and number of the classes vary across the file.我尝试选择单词
class
的所有出现,但类的长度和数量因文件而异。 So this don't work.所以这行不通。
<tr>
<td class="cta" height="32">
<a class="cta-inner" href="#" style="color:#fff;"></a>
Go To Task
</a>
</td>
</tr>
I expect cta
and cta-inner
class to be removed from the resulting html.我希望从生成的 html 中删除
cta
和cta-inner
class。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.