Add more fine-grained string tokens to the themes
And update the midnight theme to use them. So far, String.Single and String.Double do not work, but I think this is a bug in pygments (see https://bitbucket.org/birkenfeld/pygments-main/issue/685). So hopefully they fill fix it and it will start working :)
This commit is contained in:
parent
0522dfc371
commit
1ea6f71725
@ -121,6 +121,12 @@ def format_source(debugger_ui, lines, breakpoints):
|
||||
t.Name.Class: "name",
|
||||
t.Punctuation: "punctuation",
|
||||
t.String: "string",
|
||||
# XXX: Single and Double don't actually work yet.
|
||||
# See https://bitbucket.org/birkenfeld/pygments-main/issue/685
|
||||
t.String.Double: "doublestring",
|
||||
t.String.Single: "singlestring",
|
||||
t.String.Backtick: "backtick",
|
||||
t.String.Doc: "docstring",
|
||||
t.Comment: "comment",
|
||||
}
|
||||
|
||||
|
@ -244,14 +244,20 @@ def get_palette(may_use_fancy_formats, theme="classic"):
|
||||
"current source": ("white", "light gray"),
|
||||
"current focused source": ("white", "brown"),
|
||||
|
||||
"line number": ("light gray", "default"),
|
||||
"keyword": ("dark magenta", "default"),
|
||||
"name": ("white", "dark blue"),
|
||||
"name": ("white", "default"),
|
||||
"literal": ("dark cyan", "default"),
|
||||
"string": ("light red", "default"),
|
||||
"string": ("dark red", "default"),
|
||||
"doublestring": ("dark red", "default"),
|
||||
"singlestring": ("light blue", "default"),
|
||||
"docstring": ("light red", "default"),
|
||||
"backtick": ("light green", "default"),
|
||||
"punctuation": ("white", "default"),
|
||||
"comment": ("dark green", "default"),
|
||||
"classname": ("dark cyan", "default"),
|
||||
"funcname": ("white", "default"),
|
||||
"bp_star": ("dark red", "default"),
|
||||
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user