File tree Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66
77## [ Unreleased]
88
9+ ## [ 6.1.1] - 2023-03-21
10+
11+ ### Changed
12+
13+ - Fixed a bug where the call chain formatter was incorrectly looking at call messages.
14+
915## [ 6.1.0] - 2023-03-20
1016
1117### Added
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- syntax_tree (6.1.0 )
4+ syntax_tree (6.1.1 )
55 prettier_print (>= 1.2.0 )
66
77GEM
Original file line number Diff line number Diff line change @@ -2824,7 +2824,7 @@ def format_chain(q, children)
28242824 if ( receiver = child . receiver ) . is_a? ( CallNode ) &&
28252825 ( receiver . message != :call ) &&
28262826 ( receiver . message . value == "where" ) &&
2827- ( message . value == "not" )
2827+ ( child . message != :call && child . message . value == "not" )
28282828 # This is very specialized behavior wherein we group
28292829 # .where.not calls together because it looks better. For more
28302830 # information, see
@@ -2848,8 +2848,8 @@ def format_chain(q, children)
28482848 # If the parent call node has a comment on the message then we need
28492849 # to print the operator trailing in order to keep it working.
28502850 last_child = children . last
2851- if last_child . is_a? ( CallNode ) && last_child . message . comments . any? &&
2852- last_child . operator
2851+ if last_child . is_a? ( CallNode ) && last_child . message != :call &&
2852+ last_child . message . comments . any? && last_child . operator
28532853 q . format ( CallOperatorFormatter . new ( last_child . operator ) )
28542854 skip_operator = true
28552855 else
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module SyntaxTree
4- VERSION = "6.1.0 "
4+ VERSION = "6.1.1 "
55end
Original file line number Diff line number Diff line change 6565=begin
6666=end
6767 to_s
68+ %
69+ fooooooooooooooooooooooooooooooooooo.barrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.where.not(:id).order(:id)
70+ -
71+ fooooooooooooooooooooooooooooooooooo
72+ .barrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
73+ .where.not(:id)
74+ .order(:id)
You can’t perform that action at this time.
0 commit comments