RuboCop string_content keep string interpolation
This commit is contained in:
parent
1f770270b4
commit
cb187f6846
@ -495,7 +495,15 @@ module RuboCop
|
|||||||
when :str
|
when :str
|
||||||
node.str_content
|
node.str_content
|
||||||
when :dstr
|
when :dstr
|
||||||
node.each_child_node(:str).map(&:str_content).join
|
content = ""
|
||||||
|
node.each_child_node(:str, :begin) do |child|
|
||||||
|
content += if child.begin_type?
|
||||||
|
child.source
|
||||||
|
else
|
||||||
|
child.str_content
|
||||||
|
end
|
||||||
|
end
|
||||||
|
content
|
||||||
when :const
|
when :const
|
||||||
node.const_name
|
node.const_name
|
||||||
when :sym
|
when :sym
|
||||||
|
Loading…
x
Reference in New Issue
Block a user