1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00
haml--haml/lib/hamlit/text_compiler.rb
2015-03-17 23:54:47 +09:00

18 lines
352 B
Ruby

require 'hamlit/filter'
# NOTE: This compiler has an extremely bad effect for performance.
# We should optimize this.
module Hamlit
class TextCompiler < Hamlit::Filter
def on_haml_text(exp)
compile_text(exp)
end
private
# FIXME: This can't parse '!'
def compile_text(exp)
[:dynamic, "%Q!#{exp}!"]
end
end
end