Method: GraphQL::Upgrader::RemoveExcessWhitespaceTransform#apply
- Defined in:
- lib/graphql/upgrader/member.rb
#apply(input_text) ⇒ Object
753 754 755 756 757 758 759 |
# File 'lib/graphql/upgrader/member.rb', line 753 def apply(input_text) input_text .gsub(/\n{3,}/m, "\n\n") .gsub(/do\n{2,}/m, "do\n") .gsub(/\n{2,}(\s*)end/m, "\n\\1end") .gsub(/\n +\n/m, "\n\n") end |