mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
docs: restore default highlighting keywords and options in HTML
Keywords and options recently got dedicated highlighting roles inb3626d48e
(Highlight keywords differently, 2021-02-04) and711796ad1
(Highlight options differently, 2021-10-19) but still default to "command" and "parameter", respectively. The dedicated roles were not colored by our CSS theme, which makes a "test -f foo.txt" look weird: - "test" is dark blue (since it's a command) - "foo.txt" is light blue (since it's a parameter) - "-f" is black (weird!) The CSS theme doesn't support configuration, so the dedicated highlighting roles should always default to their fallback options. Make it so.
This commit is contained in:
parent
7aa0f4a2cf
commit
557d8b0334
1 changed files with 2 additions and 3 deletions
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
from pygments.lexer import Lexer
|
from pygments.lexer import Lexer
|
||||||
from pygments.token import (
|
from pygments.token import (
|
||||||
Keyword,
|
|
||||||
Name,
|
Name,
|
||||||
Comment,
|
Comment,
|
||||||
String,
|
String,
|
||||||
|
@ -30,10 +29,10 @@ ROLE_TO_TOKEN = {
|
||||||
"normal": Name.Variable,
|
"normal": Name.Variable,
|
||||||
"error": Generic.Error,
|
"error": Generic.Error,
|
||||||
"command": Name.Function,
|
"command": Name.Function,
|
||||||
"keyword": Keyword,
|
"keyword": Name.Function,
|
||||||
"statement_terminator": Punctuation,
|
"statement_terminator": Punctuation,
|
||||||
"param": Name.Constant,
|
"param": Name.Constant,
|
||||||
"option": Name.Literal,
|
"option": Name.Constant,
|
||||||
"comment": Comment,
|
"comment": Comment,
|
||||||
"match": DEFAULT,
|
"match": DEFAULT,
|
||||||
"search_match": DEFAULT,
|
"search_match": DEFAULT,
|
||||||
|
|
Loading…
Reference in a new issue