changeset 728:e7481bbbb29f

Merge changes.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 30 May 2016 20:45:27 -0700
parents 6e92b5cd0163 (current diff) 71309814e88f (diff)
children e35407c60e00
files piecrust/page.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/page.py	Sun May 29 22:18:50 2016 -0700
+++ b/piecrust/page.py	Mon May 30 20:45:27 2016 -0700
@@ -310,6 +310,10 @@
     txtlen = len(txt)
     index = txt.find('-', offset)
     while index >= 0 and index < txtlen - 8:
+        # Look for a potential `<--format-->`
+        if index > 0 and txt[index - 1] == '<' and txt[index + 1] == '-':
+            return True
+        # Look for a potential `---segment---`
         if txt[index + 1] == '-' and txt[index + 2] == '-':
             return True
         index = txt.find('-', index + 1)