diff options
Diffstat (limited to 'dev-python/ansi2html/files/ansi2html-0.9.1-fix-0-control-code.patch')
-rw-r--r-- | dev-python/ansi2html/files/ansi2html-0.9.1-fix-0-control-code.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dev-python/ansi2html/files/ansi2html-0.9.1-fix-0-control-code.patch b/dev-python/ansi2html/files/ansi2html-0.9.1-fix-0-control-code.patch new file mode 100644 index 00000000000..6e51d3f1d97 --- /dev/null +++ b/dev-python/ansi2html/files/ansi2html-0.9.1-fix-0-control-code.patch @@ -0,0 +1,28 @@ +From f4371f16fd9ba9bffdd32a877b32f78222aef87c Mon Sep 17 00:00:00 2001 +From: Corentin Chary <corentin.chary@gmail.com> +Date: Sun, 22 Jul 2012 09:25:15 +0200 +Subject: [PATCH 3/3] The 0 control code could be at the end of a sequence + +Example: u"\x1b[32;01m * \x1b[39;49;00m *" +Note that here 39 and 49 "reset to default" codes are still +not handled. +--- + ansi2html/converter.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ansi2html/converter.py b/ansi2html/converter.py +index 0609a9e..23be2d0 100755 +--- a/ansi2html/converter.py ++++ b/ansi2html/converter.py +@@ -147,7 +147,7 @@ class Ansi2HTMLConverter(object): + if params[0] in [38, 48]: + params = ["%i-%i" % (params[0], params[2])] + params[3:] + +- if params == [0]: ++ if 0 in params: + # If the control code 0 is present, close all tags we've + # opened so far. i.e. reset all attributes + yield '</span>' * n_open +-- +1.7.9.5 + |