formula_desc_cop: Fix the 'full stop at end of description' autocorrect
- It wasn't working because desc strings end in quotes, not just full stops.
This commit is contained in:
parent
0786d41693
commit
5cbb414797
@ -103,7 +103,7 @@ module RuboCop
|
|||||||
correction.gsub!(/(^|[^a-z])#{@formula_name}([^a-z]|$)/i, "\\1\\2")
|
correction.gsub!(/(^|[^a-z])#{@formula_name}([^a-z]|$)/i, "\\1\\2")
|
||||||
correction.gsub!(/^(['"]?)\s+/, "\\1")
|
correction.gsub!(/^(['"]?)\s+/, "\\1")
|
||||||
correction.gsub!(/\s+(['"]?)$/, "\\1")
|
correction.gsub!(/\s+(['"]?)$/, "\\1")
|
||||||
correction.gsub!(/\.$/, "")
|
correction.gsub!(/\.(['"]?)$/, "\\1")
|
||||||
corrector.insert_before(node.source_range, correction)
|
corrector.insert_before(node.source_range, correction)
|
||||||
corrector.remove(node.source_range)
|
corrector.remove(node.source_range)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user