diff options
Diffstat (limited to 'markdown/preprocessors.py')
-rw-r--r-- | markdown/preprocessors.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/markdown/preprocessors.py b/markdown/preprocessors.py index cbf40e3..b199f0a 100644 --- a/markdown/preprocessors.py +++ b/markdown/preprocessors.py @@ -227,7 +227,8 @@ class HtmlBlockPreprocessor(Preprocessor): # if find closing tag in_tag = False if self.markdown_in_raw and 'markdown' in attrs.keys(): - start = items[0][:left_index] + start = re.sub(r'\smarkdown(=[\'"]?[^> ]*[\'"]?)?', + '', items[0][:left_index]) items[0] = items[0][left_index:] end = items[-1][-len(right_tag)-2:] items[-1] = items[-1][:-len(right_tag)-2] @@ -243,7 +244,8 @@ class HtmlBlockPreprocessor(Preprocessor): if items: if self.markdown_in_raw and 'markdown' in attrs.keys(): - start = items[0][:left_index] + start = re.sub(r'\smarkdown(=[\'"]?[^> ]*[\'"]?)?', + '', items[0][:left_index]) items[0] = items[0][left_index:] end = items[-1][-len(right_tag)-2:] items[-1] = items[-1][:-len(right_tag)-2] |