mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
fixed padding and margins
This commit is contained in:
parent
8a9bc82b68
commit
01f3e7ec6c
2 changed files with 5 additions and 3 deletions
|
@ -41,9 +41,11 @@ def html_format(s, style="default"):
|
||||||
# need to generate stream before creating formatter so that all tokens actually exist
|
# need to generate stream before creating formatter so that all tokens actually exist
|
||||||
token_stream = partial_color_tokenize(s)
|
token_stream = partial_color_tokenize(s)
|
||||||
formatter = XonshHtmlFormatter(
|
formatter = XonshHtmlFormatter(
|
||||||
|
wrapcode=True,
|
||||||
noclasses=True,
|
noclasses=True,
|
||||||
style=proxy_style,
|
style=proxy_style,
|
||||||
prestyles="color: #" + fgcolor,
|
prestyles="margin: 0em; padding: 0.5em 0.1em; color: #" + fgcolor,
|
||||||
|
cssstyles="border-style: solid; border-radius: 5px",
|
||||||
)
|
)
|
||||||
formatter.format(token_stream, buf)
|
formatter.format(token_stream, buf)
|
||||||
return buf.getvalue()
|
return buf.getvalue()
|
||||||
|
|
|
@ -14,6 +14,6 @@ type alias PromptData =
|
||||||
|
|
||||||
prompts : List PromptData
|
prompts : List PromptData
|
||||||
prompts =
|
prompts =
|
||||||
[ { name = "Default", value = "{env_name}{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch: {}}{NO_COLOR} {BOLD_BLUE}{prompt_end}{NO_COLOR} ", display = "<div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"color: #000000; line-height: 125%\"><span></span><span style=\"\">(env) </span><span style=\"color: #007f00; font-weight: bold\">lou@carcolh</span><span style=\"color: #00007f; font-weight: bold\"> ~/snail/stuff</span><span style=\"color: #ff0000; font-weight: bold\"> branch</span><span style=\"\"> </span><span style=\"color: #00007f; font-weight: bold\">$</span><span style=\"\"> </span></pre></div>" }
|
[ { name = "Default", value = "{env_name}{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch: {}}{NO_COLOR} {BOLD_BLUE}{prompt_end}{NO_COLOR} ", display = "<div class=\"highlight\" style=\"background: #ffffff; border-style: solid; border-radius: 5px\"><pre style=\"margin: 0em; padding: 0.5em 0.1em; color: #000000; line-height: 125%\"><span></span><code><span style=\"\">(env) </span><span style=\"color: #007f00; font-weight: bold\">lou@carcolh</span><span style=\"color: #00007f; font-weight: bold\"> ~/snail/stuff</span><span style=\"color: #ff0000; font-weight: bold\"> branch</span><span style=\"\"> </span><span style=\"color: #00007f; font-weight: bold\">$</span><span style=\"\"> </span></code></pre></div>" }
|
||||||
, { name = "Just a Dollar", value = "$ ", display = "<div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"color: #000000; line-height: 125%\"><span></span><span style=\"\">$ </span></pre></div>" }
|
, { name = "Just a Dollar", value = "$ ", display = "<div class=\"highlight\" style=\"background: #ffffff; border-style: solid; border-radius: 5px\"><pre style=\"margin: 0em; padding: 0.5em 0.1em; color: #000000; line-height: 125%\"><span></span><code><span style=\"\">$ </span></code></pre></div>" }
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Reference in a new issue