|
@@ -17,7 +17,7 @@ import os
|
|
|
from functools import wraps
|
|
|
|
|
|
# Define some regular expressions
|
|
|
-LIQUID_TAG = re.compile(r'\{%.*?%\}')
|
|
|
+LIQUID_TAG = re.compile(r'\{%.*?%\}', re.MULTILINE | re.DOTALL)
|
|
|
EXTRACT_TAG = re.compile(r'(?:\s*)(\S+)(?:\s*)')
|
|
|
|
|
|
|
|
@@ -37,10 +37,10 @@ class _LiquidTagsPreprocessor(markdown.preprocessors.Preprocessor):
|
|
|
markup = EXTRACT_TAG.sub('', markup, 1)
|
|
|
if tag in self._tags:
|
|
|
liquid_tags[i] = self._tags[tag](self, tag, markup.strip())
|
|
|
-
|
|
|
+
|
|
|
# add an empty string to liquid_tags so that chaining works
|
|
|
liquid_tags.append('')
|
|
|
-
|
|
|
+
|
|
|
# reconstruct string
|
|
|
page = ''.join(itertools.chain(*zip(LIQUID_TAG.split(page),
|
|
|
liquid_tags)))
|