From 557d8b0334a453235605ddda654d0fe74e6644b1 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 16 Jan 2022 12:26:13 +0100 Subject: [PATCH] docs: restore default highlighting keywords and options in HTML Keywords and options recently got dedicated highlighting roles in b3626d48e (Highlight keywords differently, 2021-02-04) and 711796ad1 (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. --- doc_src/fish_indent_lexer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc_src/fish_indent_lexer.py b/doc_src/fish_indent_lexer.py index c3d5750d5..f4b154e8c 100644 --- a/doc_src/fish_indent_lexer.py +++ b/doc_src/fish_indent_lexer.py @@ -5,7 +5,6 @@ from pygments.lexer import Lexer from pygments.token import ( - Keyword, Name, Comment, String, @@ -30,10 +29,10 @@ ROLE_TO_TOKEN = { "normal": Name.Variable, "error": Generic.Error, "command": Name.Function, - "keyword": Keyword, + "keyword": Name.Function, "statement_terminator": Punctuation, "param": Name.Constant, - "option": Name.Literal, + "option": Name.Constant, "comment": Comment, "match": DEFAULT, "search_match": DEFAULT,