Mercurial > piecrust2
diff piecrust/page.py @ 728:e7481bbbb29f
Merge changes.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 30 May 2016 20:45:27 -0700 |
parents | ab5c6a8ae90a 71309814e88f |
children | 58ebf50235a5 |
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)