node.js - vscode有没有格式化ejs的插件?

浏览:26日期:2022-09-14

问题描述

最好能够格式化像这样的代码

<%- include(’header’)%> <h1><%=name.toUpperCase() %> </h1> <p>hello,<%= name%> </p> <%- include(’footer’)%>

问题解答

回答1:

正则表达式自己替换一下就行

回答2:

设置vscode用户配置的文件关联,把ejs关联到html。

'files.associations': { '*.ejs': 'html'}

soonfy

相关文章: