lib/rouge/cli.rb in rouge-0.2.8 vs lib/rouge/cli.rb in rouge-0.2.9

- old
+ new

@@ -58,19 +58,19 @@ # only HTML is supported for now formatter = formatter_class.new(normalize_hash_keys(options[:formatter_opts])) lexer = lexer_class.new(normalize_hash_keys(options[:lexer_opts])) - puts Rouge.highlight(source, lexer, formatter) + formatter.format(lexer.lex(source), &method(:print)) end desc 'style THEME', 'render THEME as css' option :scope, :desc => "a css selector to scope the styles to" def style(theme_name='thankful_eyes') theme = Theme.find(theme_name) raise "unknown theme: #{theme_name}" unless theme - puts theme.new(options).render + theme.new(options).render(&method(:puts)) end desc 'list', 'list the available lexers, formatters, and styles' def list puts "== Available Lexers =="