lib/hamlit/cli.rb in hamlit-2.0.1 vs lib/hamlit/cli.rb in hamlit-2.0.2
- old
+ new
@@ -48,15 +48,19 @@
end
end
def generate_ast(file)
template = File.read(file)
- Hamlit::Parser.new(escape_html: true, escape_attrs: true, ugly: true).call(template)
+ Hamlit::Parser.new(engine_options).call(template)
end
def generate_temple(file)
ast = generate_ast(file)
- Hamlit::Compiler.new.call(ast)
+ Hamlit::Compiler.new(engine_options).call(ast)
+ end
+
+ def engine_options
+ Hamlit::Engine.options
end
# Flexible default_task, compatible with haml's CLI
def method_missing(*args)
return super(*args) if args.length > 1