diff options
| author | Oleh Prypin <oleh@pryp.in> | 2020-12-30 15:09:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-30 09:09:46 -0500 |
| commit | 12be7c9a30247b1df9a211a4cc90dfb9aa136fae (patch) | |
| tree | afaafbb1e6ea8815a6c7800d066aa114b326c41a /markdown/extensions | |
| parent | 4b836201f0dbf1ce763dae3688dee38f1a39a558 (diff) | |
| download | python-markdown-12be7c9a30247b1df9a211a4cc90dfb9aa136fae.tar.gz | |
Preserve text immediately before an admonition
Diffstat (limited to 'markdown/extensions')
| -rw-r--r-- | markdown/extensions/admonition.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/markdown/extensions/admonition.py b/markdown/extensions/admonition.py index 01f9940..916d931 100644 --- a/markdown/extensions/admonition.py +++ b/markdown/extensions/admonition.py @@ -113,6 +113,8 @@ class AdmonitionProcessor(BlockProcessor): m = self.RE.search(block) if m: + if m.start() > 0: + self.parser.parseBlocks(parent, [block[:m.start()]]) block = block[m.end():] # removes the first line else: sibling, block = self.get_sibling(parent, block) |
