# HG changeset patch # User Ludovic Chabant # Date 1464666327 25200 # Node ID e7481bbbb29f331df37dcf050f3315c733b3d712 # Parent 6e92b5cd01635a90613a493eaa07aeb5e22230ac# Parent 71309814e88f16c2018c43b28635096b039de2da Merge changes. diff -r 6e92b5cd0163 -r e7481bbbb29f piecrust/page.py --- 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)