diff --git a/Library/Homebrew/rubocops/formula_desc_cop.rb b/Library/Homebrew/rubocops/formula_desc_cop.rb index 6aa395ee71..8a35e7d249 100644 --- a/Library/Homebrew/rubocops/formula_desc_cop.rb +++ b/Library/Homebrew/rubocops/formula_desc_cop.rb @@ -103,7 +103,7 @@ module RuboCop correction.gsub!(/(^|[^a-z])#{@formula_name}([^a-z]|$)/i, "\\1\\2") correction.gsub!(/^(['"]?)\s+/, "\\1") correction.gsub!(/\s+(['"]?)$/, "\\1") - correction.gsub!(/\.$/, "") + correction.gsub!(/\.(['"]?)$/, "\\1") corrector.insert_before(node.source_range, correction) corrector.remove(node.source_range) end