diff --git a/share/tools/web_config/fishconfig.css b/share/tools/web_config/fishconfig.css index 1c9043732..ef0ee2dc9 100644 --- a/share/tools/web_config/fishconfig.css +++ b/share/tools/web_config/fishconfig.css @@ -4,6 +4,10 @@ body { color: white; } +code { + font-family: "Source Code Pro", "DejaVu Sans Mono", Menlo, "Ubuntu Mono", Consolas, Monaco, "Lucida Console", monospace, fixed; +} + #ancestor { width: 80%; margin-left: auto; @@ -105,13 +109,29 @@ body { width: 100%; } -.detail_function { - white-space: pre-wrap; +.detail_function pre { + white-space: pre-wrap !important; width: 100%; font-size: 11pt; color: #BBB; } +/* The colours used for function highlighting are taken from the fish + * default colour scheme, defined in js/colorutils.js. + * These could be pulled from the current terminal (but the background colour + * might be different), or dynamically from colorutils.js. + */ +.detail_function .fish_color_autosuggestion { color: #555; } +.detail_function .fish_color_command { color: #005fd7; } +.detail_function .fish_color_param { color: #00afff; } +.detail_function .fish_color_redirection { color: #00afff; } +.detail_function .fish_color_comment { color: #990000; } +.detail_function .fish_color_error { color: #ff0000; } +.detail_function .fish_color_escape { color: #00a6b2; } +.detail_function .fish_color_operator { color: #00a6b2; } +.detail_function .fish_color_quote { color: #999900; } +.detail_function .fish_color_statement_terminator { color: #009900; } + .master_element { cursor: pointer; padding-top: 6px; diff --git a/share/tools/web_config/partials/functions.html b/share/tools/web_config/partials/functions.html index 7442b1cee..50562f79b 100644 --- a/share/tools/web_config/partials/functions.html +++ b/share/tools/web_config/partials/functions.html @@ -7,6 +7,6 @@
-
{{ functionDefinition }}
+
diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index fcf79e0af..77d8017ad 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -726,7 +726,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): return out def do_get_function(self, func_name): - out, err = run_fish_cmd('functions ' + func_name) + out, err = run_fish_cmd('functions ' + func_name + ' | fish_indent --html') return out def do_delete_history_item(self, history_item_text):