Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix --help to show --formatter-preset and possible options #1830

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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