# HG changeset patch # User Ludovic Chabant # Date 1519775030 28800 # Node ID af57fbe9435a451d810eab12e71f06666f05a96e # Parent 1dcebff866f16d609e110c41d59c24a5bb56e30b formatter: Fix the regex used to find page segments. It was incorrectly matching a Markdown horizontal rule followed by a title if the title had exactly 3 dashes underneath it. diff -r 1dcebff866f1 -r af57fbe9435a piecrust/page.py --- a/piecrust/page.py Sun Feb 25 23:19:38 2018 -0800 +++ b/piecrust/page.py Tue Feb 27 15:43:50 2018 -0800 @@ -301,8 +301,7 @@ segment_pattern = re.compile( - r"""^\-\-\-\s*(?P\w+)(\:(?P\w+))?\s*\-\-\-\s*$""", - re.M) + r"^\-\-\-[ \t]*(?P\w+)(\:(?P\w+))?[ \t]*\-\-\-[ \t]*$", re.M) def _count_lines(txt, start=0, end=-1):