Index: docs/src/filter_demo_output.py |
diff --git a/docs/src/filter_demo_output.py b/docs/src/filter_demo_output.py |
index 5f0fd3e45db905e7b0ede83d62d1b5a1f3f64e5a..3b3afb8d04f5e55d43f16816688b4669075d7c5f 100755 |
--- a/docs/src/filter_demo_output.py |
+++ b/docs/src/filter_demo_output.py |
@@ -77,6 +77,8 @@ def main(): |
w = sys.stdout.write |
+ comment_marker = '###COMMENT###' |
+ |
callout_counter = 1 |
if backend == 'xhtml11': |
preamble = ( |
@@ -88,11 +90,11 @@ def main(): |
in_code = False |
body = c.convert(output, full=False) |
for i, line in enumerate(body.splitlines()): |
- if line.startswith('# '): |
+ if line.startswith(comment_marker): |
if in_code: |
w(postamble) |
in_code = False |
- w(line[1:]) |
+ w(line[len(comment_marker):]) |
else: |
if not in_code: |
w(preamble) |
@@ -115,11 +117,11 @@ def main(): |
in_code = False |
body = simpleXML(output) |
for i, line in enumerate(body.splitlines()): |
- if line.startswith('# '): |
+ if line.startswith(comment_marker): |
if in_code: |
w(postamble) |
in_code = False |
- w(line[1:]) |
+ w(line[len(comment_marker):]) |
else: |
if not in_code: |
w(preamble) |