Commit 6b052e91 authored by Matthias BUSSONNIER's avatar Matthias BUSSONNIER

Add a div with cython class for embedding

This allow to reuse directly the body and embed it without having to
wrap it in the correct div and have the CSS apply to it.
parent 74f467c7
......@@ -135,7 +135,7 @@ class AnnotationCCodeWriter(CCodeWriter):
return ''.join(outlist)
def _save_annotation_body(self, lines, code_source_file):
outlist = []
outlist = [u'<div class="cython">']
pos_comment_marker = u'/* \N{HORIZONTAL ELLIPSIS} */\n'
new_calls_map = dict(
(name, 0) for name in
......@@ -170,6 +170,7 @@ class AnnotationCCodeWriter(CCodeWriter):
outlist.append(u"<pre class='cython line score-%s' onclick='toggleDiv(this)'> %d: %s</pre>\n" % (
score, k, line.rstrip()))
outlist.append(u"<pre class='cython code score-%s'>%s</pre>" % (score, code))
outlist.append(u"</div>")
return outlist
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment