Skip to content

Mangled Syntax Problem #69

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
Petercopter opened this issue Jan 25, 2023 · 1 comment · Fixed by #75
Closed

Mangled Syntax Problem #69

Petercopter opened this issue Jan 25, 2023 · 1 comment · Fixed by #75

Comments

@Petercopter
Copy link

Petercopter commented Jan 25, 2023

syntax_tree: 5.0.0
syntax_tree-haml: 2.0.0

Using the VSCode extension, format on save.

Given this line:

%h1= @page.new_record? ? "New #{@page.type.titleize}" : 'Edit Page'

syntax_tree does this:

%h1 page.new_record? ? "New #{@page.type.titleize}" : 'Edit Page

For now I'll just do

%h1
  = @page.new_record? ? "New #{@page.type.titleize}" : 'Edit Page'

Which doesn't trigger the error.

@kddnewton
Copy link
Member

I'll release this in 4.0.1

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

Successfully merging a pull request may close this issue.

2 participants