mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
18 lines
352 B
Ruby
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
|