mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-08-16 06:30:22 +03:00
[language-ruby] Fix our attempt to fold Ruby comments…
…so that it doesn’t try to look up a child node that we know won’t exist. Most Ruby comments aren’t foldable because they start and end on the same line — by their very nature! But there is one obscure multi-line syntax that we can support, so this tells Pulsar to fold to the end of the comment itself.
This commit is contained in:
parent
b61e491f2e
commit
ef26c588a3
@ -1,6 +1,5 @@
|
||||
[
|
||||
(method)
|
||||
(comment)
|
||||
(singleton_method)
|
||||
(class)
|
||||
(module)
|
||||
@ -16,6 +15,10 @@
|
||||
(string_array)
|
||||
] @fold
|
||||
|
||||
; Multi-line comment syntax (=begin…=end) is obscure and out of favor, but we
|
||||
; might as well make it foldable.
|
||||
((comment) @fold
|
||||
(#set! fold.endAt endPosition))
|
||||
|
||||
; Fold from `if` to the next `elsif` or `else` in the chain.
|
||||
((if
|
||||
|
Loading…
Reference in New Issue
Block a user