mde / ejs

Embedded JavaScript templates -- http://ejs.co
Apache License 2.0
7.7k stars 841 forks source link

add <%& raw mode equals <%- #667

Closed tans closed 2 years ago

tans commented 2 years ago

add this feature because prettier.js formatter auto change <%- to <% -,

any other solutions for this, prettier.js HTML formatter is useful. I don't know how to fixed it to compatible ejs, so I change ejs syntax compatible with ejs

mde commented 2 years ago

I am not going to create more complexity in EJS simply because people choose to use a formatting tool that can't be sensibly configured. Prettier doesn't allow any configuration, which is a great idea in theory, but is a terrible idea in practice. There are other options available to you, including JSHint/ESLint et al.

tans commented 2 years ago

yes, I agree to keep EJS syntax simple, hope anyone has a more elegant solution for this problem.

ecmel commented 1 year ago

I wrote a plugin for prettier to handle EJS syntax. https://github.com/ecmel/prettier-plugin-ejs