prettier/plugin-ruby

haml: Prettier removes HTML unescaping exclamation marks

denschub opened this issue · 2 comments

It appears like the plugin doesn't like the exclamation mark to force-unescape HTML. I tried running it on a large code base, and it broke a lot of templates because it removes all the exclamation marks. While explicitly calling .html_safe is a "workaround", I'm not sure if the reformatting should remove the exclamation marks - after all, that's a very explicit decision a well. :)

Metadata

  • Operating system: macOS
  • Ruby version: latest
  • Node version: latest
  • @prettier/plugin-ruby or prettier gem version: latest
  • syntax_tree version: latest

Input

!= body

Current output

= body

Expected output

!= body

Thanks I'll take a look!

Thank you! :)