# HG changeset patch # User Ludovic Chabant # Date 1464666276 25200 # Node ID 71309814e88f16c2018c43b28635096b039de2da # Parent dab26ab3d533fae7676050a6ccffc7962b6d6aea bug: Also look for format changes when determining if a page needs parsing. diff -r dab26ab3d533 -r 71309814e88f piecrust/page.py --- a/piecrust/page.py Sat Apr 16 23:12:06 2016 -0700 +++ b/piecrust/page.py Mon May 30 20:44:36 2016 -0700 @@ -307,6 +307,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)