Sha256: 1cfd76905bcd3dabaceca1a4b66795e07f8dd20403b1a4e7aa55abd0c8fe05c0

Contents?: true

Size: 206 Bytes

Versions: 2

Compression:

Stored size: 206 Bytes

Contents

module Source2MD
  module TextHelper
    extend self

    def text_squish(text)
      text.gsub(/\n{2,}/, "\n\n")
    end

    def add_newline_at_end_of_text(text)
      text.strip + "\n"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
source2md-0.0.2 lib/source2md/text_helper.rb
source2md-0.0.1 lib/source2md/text_helper.rb