| Index: tools/gn/bin/help_as_html.py
|
| diff --git a/tools/gn/bin/help_as_html.py b/tools/gn/bin/help_as_html.py
|
| index f8f1c1bc271cf80fb5427c71db1c22286bd9edaf..9dfea3175628681f32087e382955db4b45bb4539 100755
|
| --- a/tools/gn/bin/help_as_html.py
|
| +++ b/tools/gn/bin/help_as_html.py
|
| @@ -12,13 +12,17 @@
|
| # - Spit out other similar formats like wiki, markdown, whatever.
|
|
|
| import cgi
|
| +import re
|
| import subprocess
|
| import sys
|
|
|
|
|
| def GetOutput(*args):
|
| try:
|
| - return subprocess.check_output([sys.argv[1]] + list(args))
|
| + # TODO: Remove ansi escape code stripping if crbug.com/362239 gets fixed.
|
| + ansi_escape = re.compile(r'\x1b[^m]*m')
|
| + return ansi_escape.sub(
|
| + '', subprocess.check_output([sys.argv[1]] + list(args)))
|
| except subprocess.CalledProcessError:
|
| return ''
|
|
|
|
|