From: Robert Bradshaw Date: Tue, 4 Nov 2008 20:12:00 +0000 (-0800) Subject: remove line comments from annotated html X-Git-Tag: 0.10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=34d912c19c64264fc86e69006e8643c4c3525b6f;p=cython.git remove line comments from annotated html They're still in the source, but it makes the html less redundant and easier to read... --- diff --git a/Cython/Compiler/Annotate.py b/Cython/Compiler/Annotate.py index 4796ec83..09b60251 100644 --- a/Cython/Compiler/Annotate.py +++ b/Cython/Compiler/Annotate.py @@ -14,6 +14,8 @@ from Cython import Utils special_chars = [(u'<', u'\xF0', u'<'), (u'>', u'\xF1', u'>'), (u'&', u'\xF2', u'&')] + +line_pos_comment = re.compile(r'/\*.*?<<<<<<<<<<<<<<.*?\*/\n*', re.DOTALL) class AnnotationCCodeWriter(CCodeWriter): @@ -153,6 +155,7 @@ function toggleDiv(id) { f.write(line.rstrip()) f.write(u'\n') + code = re.sub(line_pos_comment, '', code) # inline annotations are redundant f.write(u"
%s
" % (k, color, code)) f.write(u'\n') f.close()