# File lib/rhc/core_ext.rb, line 58 def strip_heredoc indent = scan(/^[ \t]*(?=\S)/).min.size || 0 gsub(/^[ \t]{#{indent}}/, ''). gsub(/(\b|\S)[^\S\n]*\n(\S)/m, '\1 \2'). gsub(/\n+\Z/, ''). gsub(/\n{3,}/, "\n\n") end