From f77a65084781fc36ca8a4d09f1334247e38399cc Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 25 Mar 2015 14:29:06 +0100 Subject: [PATCH] Fixed error in text2html, but webclient still doesn't support all color codes. --- evennia/utils/text2html.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/evennia/utils/text2html.py b/evennia/utils/text2html.py index edf92c7cf6..8427a3341c 100644 --- a/evennia/utils/text2html.py +++ b/evennia/utils/text2html.py @@ -22,25 +22,26 @@ class TextToHTMLparser(object): tabstop = 4 # mapping html color name <-> ansi code. hilite = ANSI_HILITE + unhilite = ANSI_UNHILITE normal = ANSI_NORMAL underline = ANSI_UNDERLINE colorcodes = [ ('red', hilite + ANSI_RED), - ('maroon', ANSI_RED), + ('maroon', unhilite + ANSI_RED), ('lime', hilite + ANSI_GREEN), - ('green', ANSI_GREEN), + ('green', unhilite + ANSI_GREEN), ('yellow', hilite + ANSI_YELLOW), - ('olive', ANSI_YELLOW), + ('olive', unhilite + ANSI_YELLOW), ('blue', hilite + ANSI_BLUE), - ('navy', ANSI_BLUE), + ('navy', unhilite + ANSI_BLUE), ('magenta', hilite + ANSI_MAGENTA), - ('purple', ANSI_MAGENTA), + ('purple', unhilite + ANSI_MAGENTA), ('cyan', hilite + ANSI_CYAN), - ('teal', ANSI_CYAN), + ('teal', unhilite + ANSI_CYAN), ('white', hilite + ANSI_WHITE), # pure white - ('gray', ANSI_WHITE), # light grey + ('gray', unhilite + ANSI_WHITE), # light grey ('dimgray', hilite + ANSI_BLACK), # dark grey - ('black', ANSI_BLACK), # pure black + ('black', unhilite + ANSI_BLACK), # pure black ] colorback = [ ('bgred', hilite + ANSI_BACK_RED),