diff --git a/mojofmt.py b/mojofmt.py index 6010b86..2114f9b 100755 --- a/mojofmt.py +++ b/mojofmt.py @@ -90,7 +90,9 @@ RAW_CLOSE_RE = re.compile(r"^\s*pre|script|style|textarea)\s*>\s*$", # Extended EP block delimiters (opening/closing on their own lines) OPEN_BLOCK_RE = re.compile(r'^(?P[ \t]*)<%(?P-?)(?![=#])\s*$') -CLOSE_BLOCK_RE = re.compile(r'^(?P[ \t]*)(?P-?)%>\s*$') +CLOSE_BLOCK_RE = re.compile( + r'^(?P[ \t]*)(?P-?)%(?:>| >)\s*$' +) @dataclass