Sha256: 12f9cc03ac793bb230c1a7df15926a97651a9dfca93ced6d35d3c1c9db233baa
Contents?: true
Size: 404 Bytes
Versions: 55
Compression:
Stored size: 404 Bytes
Contents
require 'hamlit/filters/base' module Hamlit module Filters class Plain < Base def compile(lines) ast = [:multi] text = compile_lines(lines) text.gsub!(/\n\Z/, '') unless string_interpolated?(text) ast << [:haml, :text, text] ast end private def string_interpolated?(text) text =~ /\#{[^\#{}]*}/ end end end end
Version data entries
55 entries across 55 versions & 1 rubygems