Skip to content

Commit bce79b9

Browse files
author
Richard Hulse
committed
turn on optimize selector for commandline tidy
There is now an option to turn it off. This is mostly so when people compare the two, tidy is running at maximum optimisation.
1 parent ce30455 commit bce79b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/css-tidy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ opts = GetoptLong.new(
1111
['--help', '-h', GetoptLong::NO_ARGUMENT],
1212
['--input', '-i', GetoptLong::REQUIRED_ARGUMENT],
1313
['--output', '-o', GetoptLong::REQUIRED_ARGUMENT],
14-
['--optimize-selectors', '-s', GetoptLong::NO_ARGUMENT])
14+
['--no-optimize-selectors', '-s', GetoptLong::NO_ARGUMENT])
1515

1616
$infile = nil
1717
$outfile = nil
@@ -29,7 +29,7 @@ def usage
2929
end
3030

3131
# The options that will be passed to the tidy method
32-
options = {}
32+
options = {:optimize_selectors => true}
3333

3434
opts.each do |opt, arg|
3535
case opt
@@ -39,8 +39,8 @@ opts.each do |opt, arg|
3939
$infile = arg
4040
when '--output'
4141
$outfile = arg
42-
when '--optimize-selectors'
43-
options = options.merge({:optimize_selectors => true})
42+
when '--no-optimize-selectors'
43+
options = options.merge({:optimize_selectors => false})
4444
end
4545
end
4646

0 commit comments

Comments
 (0)