lib/rubocop/cop/rspec/excessive_docstring_spacing.rb in rubocop-rspec-2.23.2 vs lib/rubocop/cop/rspec/excessive_docstring_spacing.rb in rubocop-rspec-2.24.0
- old
+ new
@@ -64,10 +64,12 @@
/x)
end
# @param text [String]
def strip_excessive_whitespace(text)
- text.strip.gsub(/[[:blank:]]{2,}/, ' ')
+ text
+ .gsub(/[[:blank:]]{2,}/, ' ')
+ .gsub(/\A[[:blank:]]|[[:blank:]]\z/, '')
end
# @param node [RuboCop::AST::Node]
# @param text [String]
def add_whitespace_offense(node, text)