ruby-syntax-tree/syntax_tree-haml

Quotes and `=` are removed from interpolated string content

LaurelOlson opened this issue · 3 comments

The quotes and = are removed around the following interpolated string on format:

%span= "- #{foo}"

becomes

%span - #{foo}

This causes invalid syntax and the prettier-ruby plugin then stalls and fails to complete file formatting.

This is using the latest version (4.0.1)

It works if the content is placed on a newline:

%span
  = "- #{foo}"

This is by design, taking advantage of their interpolation. See https://haml.info/docs/yardoc/file.REFERENCE.html#ruby-interpolation-. Is it still hanging for you or was that an inline comment like the other issue?

Also thank you very much for the issue reports! I really appreciate the help.

Ah OK thank you!

Inline comment no longer hangs - fixed after updating prettier_print as suggested