Skip to content

Commit

Permalink
fix --help to show --formatter-preset and possible options (#1830)
Browse files Browse the repository at this point in the history
  • Loading branch information
jneen and http://jneen.net/ authored Jun 14, 2022
1 parent 09685f9 commit a998f1b
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions lib/rouge/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,35 +174,38 @@ def self.doc
yield %[usage: rougify highlight <filename> [options...]]
yield %[ rougify highlight [options...]]
yield %[]
yield %[--input-file|-i <filename> specify a file to read, or - to use stdin]
yield %[--input-file|-i <filename> specify a file to read, or - to use stdin]
yield %[]
yield %[--lexer|-l <lexer> specify the lexer to use.]
yield %[ If not provided, rougify will try to guess]
yield %[ based on --mimetype, the filename, and the]
yield %[ file contents.]
yield %[--lexer|-l <lexer> specify the lexer to use.]
yield %[ If not provided, rougify will try to guess]
yield %[ based on --mimetype, the filename, and the]
yield %[ file contents.]
yield %[]
yield %[--formatter|-f <opts> specify the output formatter to use.]
yield %[ If not provided, rougify will default to]
yield %[ terminal256.]
yield %[--formatter-preset|-f <opts> specify the output formatter to use.]
yield %[ If not provided, rougify will default to]
yield %[ terminal256. options are: terminal256,]
yield %[ terminal-truecolor, html, html-pygments,]
yield %[ html-inline, html-line-table, html-table,]
yield %[ null/raw/tokens, or tex.]
yield %[]
yield %[--theme|-t <theme> specify the theme to use for highlighting]
yield %[ the file. (only applies to some formatters)]
yield %[--theme|-t <theme> specify the theme to use for highlighting]
yield %[ the file. (only applies to some formatters)]
yield %[]
yield %[--mimetype|-m <mimetype> specify a mimetype for lexer guessing]
yield %[--mimetype|-m <mimetype> specify a mimetype for lexer guessing]
yield %[]
yield %[--lexer-opts|-L <opts> specify lexer options in CGI format]
yield %[ (opt1=val1&opt2=val2)]
yield %[--lexer-opts|-L <opts> specify lexer options in CGI format]
yield %[ (opt1=val1&opt2=val2)]
yield %[]
yield %[--formatter-opts|-F <opts> specify formatter options in CGI format]
yield %[ (opt1=val1&opt2=val2)]
yield %[--formatter-opts|-F <opts> specify formatter options in CGI format]
yield %[ (opt1=val1&opt2=val2)]
yield %[]
yield %[--require|-r <filename> require a filename or library before]
yield %[ highlighting]
yield %[--require|-r <filename> require a filename or library before]
yield %[ highlighting]
yield %[]
yield %[--escape allow the use of escapes between <! and !>]
yield %[--escape allow the use of escapes between <! and !>]
yield %[]
yield %[--escape-with <l> <r> allow the use of escapes between custom]
yield %[ delimiters. implies --escape]
yield %[--escape-with <l> <r> allow the use of escapes between custom]
yield %[ delimiters. implies --escape]
end

# There is no consistent way to do this, but this is used elsewhere,
Expand Down

0 comments on commit a998f1b

Please sign in to comment.