Comment handling of array access within do block
See original GitHub issueMetadata
- Ruby version: 2.5 + 2.6
- @prettier/plugin-ruby version: 0.6.3
Input
list.each do |item|
# Some comment
puts item[0]
end
Current output
list.each do |item|
puts # Some comment
item[
0
]
end
Expected output
list.each do |item|
# Some comment
puts item[0]
end
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Accessing a C array of blocks inside a block - Stack Overflow
1 Answer 1 · In C arrays are pointers are closely interrelated. · As you have discovered you cannot capture a local array...
Read more >Accessing array out of bounds in C/C++ - GeeksforGeeks
Stay inside the bounds of the array in C programming while using arrays to avoid any such errors. C++ however offers the std::vector...
Read more >How To Work with Arrays in Ruby - DigitalOcean
In this tutorial, you'll create arrays, access the values they contain, add, modify, and remove elements in an array, and iterate through ...
Read more >Chapter 7: Arrays - cs.utsa.edu
This just declares a variable that can hold an array, but does not create the array itself. For example, to declare a variable,...
Read more >4. Pointers and Arrays - Understanding and Using C ... - O'Reilly
That is, when we access the array using only one subscript, ... In the section Pointers and Multidimensional Arrays, we will examine this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Finally have a fix for this
@NoahTheDuke Definitely not - PEBKAC. Updated the before/after - thanks!