mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Changing tab characters for webclient. Resolve #2239.
This commit is contained in:
parent
dedb1b3d66
commit
fd1ef7e9eb
3 changed files with 9 additions and 4 deletions
|
|
@ -85,8 +85,7 @@ class ANSIParser(object):
|
|||
to ANSI command sequences
|
||||
|
||||
We also allow to escape colour codes
|
||||
by prepending with a \ for xterm256,
|
||||
an extra | for Merc-style codes
|
||||
by prepending with an extra |.
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -97,6 +96,7 @@ class ANSIParser(object):
|
|||
(r"|n", ANSI_NORMAL), # reset
|
||||
(r"|/", ANSI_RETURN), # line break
|
||||
(r"|-", ANSI_TAB), # tab
|
||||
(r"|>", ANSI_SPACE * 4), # indent (4 spaces)
|
||||
(r"|_", ANSI_SPACE), # space
|
||||
(r"|*", ANSI_INVERSE), # invert
|
||||
(r"|^", ANSI_BLINK), # blinking text (very annoying and not supported by all clients)
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ class TextToHTMLparser(object):
|
|||
elif cdict["lineend"]:
|
||||
return "<br>"
|
||||
elif cdict["tab"]:
|
||||
text = cdict["tab"].replace("\t", " " * self.tabstop)
|
||||
text = cdict["tab"].replace("\t", "<span class=\"tabspace\">	</span>")
|
||||
return text
|
||||
elif cdict["space"] or cdict["spacestart"]:
|
||||
text = cdict["space"]
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
a:link, a:visited { color: inherit; }
|
||||
a:hover, a:active { color: inherit;
|
||||
font-weight: bold;}
|
||||
|
|
@ -92,6 +91,12 @@ div {margin:0px;}
|
|||
background-color: #333;
|
||||
}
|
||||
|
||||
.tabspace {
|
||||
white-space: pre;
|
||||
tab-size: 4;
|
||||
-moz-tab-size: 4;
|
||||
}
|
||||
|
||||
/* Container surrounding entire client */
|
||||
#clientwrapper {
|
||||
height: 100%;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue