We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a58e81 commit 5bcf12fCopy full SHA for 5bcf12f
lib/syntax_tree/node.rb
@@ -1042,17 +1042,16 @@ def format(q)
1042
# Determins if the following value should be indented or not.
1043
module AssignFormatting
1044
def self.skip_indent?(value)
1045
- (value.is_a?(Call) && skip_indent?(value.receiver)) ||
1046
- [
1047
- ArrayLiteral,
1048
- HashLiteral,
1049
- Heredoc,
1050
- Lambda,
1051
- QSymbols,
1052
- QWords,
1053
- Symbols,
1054
- Words
1055
- ].include?(value.class)
+ case value
+ in ArrayLiteral | HashLiteral | Heredoc | Lambda | QSymbols | QWords | Symbols | Words
+ true
+ in Call[receiver:]
+ skip_indent?(receiver)
+ in DynaSymbol[quote:]
+ quote.start_with?("%s")
+ else
+ false
+ end
1056
end
1057
1058
0 commit comments