Skip to content

Commit

Permalink
Add autoclose option to command line
Browse files Browse the repository at this point in the history
Allow specifying list of elements which should be autoclosed on the
commend line.

Closes #338
  • Loading branch information
mattwildig committed Nov 20, 2012
1 parent 4b19335 commit 839389c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/haml/exec.rb
Expand Up @@ -241,7 +241,12 @@ def set_opts(opts)
'Always add CDATA sections to javascript and css blocks.') do
@options[:for_engine][:cdata] = true
end


opts.on('--autoclose LIST',
'Comma separated list of elements to be automatically self-closed.') do |list|
@options[:for_engine][:autoclose] = list.split(',')
end

opts.on('--suppress-eval',
'Don\'t evaluate Ruby scripts.') do
@options[:for_engine][:suppress_eval] = true
Expand Down

0 comments on commit 839389c

Please sign in to comment.