mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:54:04 +08:00
webconfig: apply colour syntax highlighting to functions tab
Closes #1432.
This commit is contained in:
parent
1e9caecbcb
commit
d3cfab1391
|
@ -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;
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="detail_function">{{ functionDefinition }}</div>
|
||||
<div class="detail_function" ng-bind-html="functionDefinition"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user