diff options
| author | Waylan Limberg <waylan.limberg@icloud.com> | 2020-11-19 14:42:24 -0500 |
|---|---|---|
| committer | Waylan Limberg <waylan.limberg@icloud.com> | 2020-11-19 14:51:57 -0500 |
| commit | 82ac9056350e67411cdb1da34363950b1e18a271 (patch) | |
| tree | 476c15c673ffe3a92700dcc9f96e41f586f1d4dc /markdown/extensions | |
| parent | 81cc5b8bf1ad2a44b0a042d059caab3ed802ed33 (diff) | |
| download | python-markdown-82ac9056350e67411cdb1da34363950b1e18a271.tar.gz | |
Properly parse processing instructions in md_in_html
Empty tags do not have a `mardkown` attribute set on them. Therefore,
there is no need to check the mdstack to determine behavior. If we
are in any md_in_html state (regardless of block, span, etc) the
behavior is the same. Fixes #1070.
Diffstat (limited to 'markdown/extensions')
| -rw-r--r-- | markdown/extensions/md_in_html.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/markdown/extensions/md_in_html.py b/markdown/extensions/md_in_html.py index b8848ef..6d2a0e7 100644 --- a/markdown/extensions/md_in_html.py +++ b/markdown/extensions/md_in_html.py @@ -204,10 +204,7 @@ class HTMLExtractorExtra(HTMLExtractor): if self.at_line_start() and is_block: self.handle_data('\n' + self.md.htmlStash.store(data) + '\n\n') else: - if self.mdstate and self.mdstate[-1] == "off": - self.handle_data(self.md.htmlStash.store(data)) - else: - self.handle_data(data) + self.handle_data(self.md.htmlStash.store(data)) class HtmlBlockPreprocessor(Preprocessor): |
