Skip to content

Quotes and = are removed from interpolated string content #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LaurelOlson opened this issue Mar 9, 2023 · 3 comments
Closed

Quotes and = are removed from interpolated string content #78

LaurelOlson opened this issue Mar 9, 2023 · 3 comments

Comments

@LaurelOlson
Copy link

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}"
@kddnewton
Copy link
Member

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.

@LaurelOlson
Copy link
Author

Ah OK thank you!

@LaurelOlson
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants