Sha256: 64188a69673b2340364fe7f8c7a7eae7f5da83749a1d19a7b5c7d82cf38d6dcc
Contents?: true
Size: 667 Bytes
Versions: 9
Compression:
Stored size: 667 Bytes
Contents
module Locomotive module Liquid module Filters module Text def underscore(input) input.to_s.gsub(' ', '_').gsub('/', '_').underscore end def dasherize(input) input.to_s.gsub(' ', '-').gsub('/', '-').dasherize end def multi_line(input) input.to_s.gsub("\n", '<br/>') end def concat(input, *args) result = input.to_s args.flatten.each { |a| result << a.to_s } result end def textile(input) ::RedCloth.new(input).to_html end end ::Liquid::Template.register_filter(Text) end end end
Version data entries
9 entries across 9 versions & 1 rubygems