Skip to content

'do' followed by comment replaced with {, but not its 'end' #1042

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
JoshuaKGoldberg opened this issue Nov 9, 2021 · 1 comment · Fixed by #1050
Closed

'do' followed by comment replaced with {, but not its 'end' #1042

JoshuaKGoldberg opened this issue Nov 9, 2021 · 1 comment · Fixed by #1050

Comments

@JoshuaKGoldberg
Copy link

Metadata

  • Operating system: MacOS
  • Ruby version: 2.7.1p83
  • Node version: 14.17.2
  • @prettier/plugin-ruby version: 2.0.0
  • prettier gem version: 2.0.0
  • Options:
    • printWidth - 160
    • rubyArrayLiteral - true
    • rubyHashLabel - true
    • rubyModifier - true
    • rubySingleQuote - false
    • rubyToProc - false
    • trailingComma - "none"

Input

let!(:some_variable) do # comment text
  nil
end

Actual Output

let!(:some_variable) { # comment text
  nil
end

Expected Output

Either of these:

let!(:some_variable) do # comment text
  nil
end
let!(:some_variable) { # comment text
  nil
}
kddnewton added a commit that referenced this issue Nov 18, 2021
@kddnewton kddnewton mentioned this issue Nov 18, 2021
kddnewton added a commit that referenced this issue Nov 18, 2021
@kddnewton
Copy link
Member

Sorry for the delay! Had to get this big parser refactor done first. This is now fixed on main and will be out in the next release.

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