Commit 4e1ad627 authored by Stefan Behnel's avatar Stefan Behnel

replace C code position marker in annotated sources by ellipsis instead of...

replace C code position marker in annotated sources by ellipsis instead of discarding it to properly mark separate code chunks
parent 65a62d4a
...@@ -141,6 +141,7 @@ function toggleDiv(id) { ...@@ -141,6 +141,7 @@ function toggleDiv(id) {
return ur"<span class='%s'>%s</span>" % ( return ur"<span class='%s'>%s</span>" % (
group_name, match.group(group_name)) group_name, match.group(group_name))
pos_comment_marker = u'/* \u2026 */\n'
k = 0 k = 0
code_source_file = self.code.get(source_filename, {}) code_source_file = self.code.get(source_filename, {})
for line in lines: for line in lines:
...@@ -150,7 +151,10 @@ function toggleDiv(id) { ...@@ -150,7 +151,10 @@ function toggleDiv(id) {
except KeyError: except KeyError:
code = '' code = ''
else: else:
code = html_escape(_replace_pos_comment('', code)) code = _replace_pos_comment(pos_comment_marker, code)
if code.startswith(pos_comment_marker):
code = code[len(pos_comment_marker):]
code = html_escape(code)
calls = zero_calls.copy() calls = zero_calls.copy()
code = _parse_code(annotate, code) code = _parse_code(annotate, code)
......
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