Sha256: b3d7760c8f337bd9472d271293414fd6f648f38b749fe71b42f3cdb7c433123f
Contents?: true
Size: 373 Bytes
Versions: 76
Compression:
Stored size: 373 Bytes
Contents
# frozen_string_literal: true module Hamlit module Helpers extend self # The same as original Haml::Helpers#preserve without block support. def preserve(input) # https://github.com/haml/haml/blob/4.1.0.beta.1/lib/haml/helpers.rb#L130-L133 s = input.to_s.chomp("\n") s.gsub!(/\n/, '
') s.delete!("\r") s end end end
Version data entries
76 entries across 76 versions & 1 rubygems