mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-31 20:21:59 -07:00
doc: escape braces in AsciiDoc
This commit fixes a bug where AsciiDoc would drop any line containing a '{foo}' because it interpreted it as an undefined attribute reference: > Simple attribute references take the form {<name>}. If the attribute name > is defined its text value is substituted otherwise the line containing the > reference is dropped from the output. See: https://www.methods.co.nz/asciidoc/chunked/ch30.html We fix this by simply replacing all occurrences of '{' and '}' with their escaped forms: '{' and '}'. Fixes #1101
This commit is contained in:
10
src/app.rs
10
src/app.rs
@@ -788,17 +788,17 @@ to one of eight choices: red, blue, green, cyan, magenta, yellow, white and
|
||||
black. Styles are limited to nobold, bold, nointense, intense, nounderline
|
||||
or underline.
|
||||
|
||||
The format of the flag is `{type}:{attribute}:{value}`. `{type}` should be
|
||||
one of path, line, column or match. `{attribute}` can be fg, bg or style.
|
||||
`{value}` is either a color (for fg and bg) or a text style. A special format,
|
||||
`{type}:none`, will clear all color settings for `{type}`.
|
||||
The format of the flag is '{type}:{attribute}:{value}'. '{type}' should be
|
||||
one of path, line, column or match. '{attribute}' can be fg, bg or style.
|
||||
'{value}' is either a color (for fg and bg) or a text style. A special format,
|
||||
'{type}:none', will clear all color settings for '{type}'.
|
||||
|
||||
For example, the following command will change the match color to magenta and
|
||||
the background color for line numbers to yellow:
|
||||
|
||||
rg --colors 'match:fg:magenta' --colors 'line:bg:yellow' foo.
|
||||
|
||||
Extended colors can be used for `{value}` when the terminal supports ANSI color
|
||||
Extended colors can be used for '{value}' when the terminal supports ANSI color
|
||||
sequences. These are specified as either 'x' (256-color) or 'x,x,x' (24-bit
|
||||
truecolor) where x is a number between 0 and 255 inclusive. x may be given as
|
||||
a normal decimal number or a hexadecimal number, which is prefixed by `0x`.
|
||||
|
Reference in New Issue
Block a user