Skip to content

Don't wrongly discard text immediately before an admonition - #1092

Merged
waylan merged 3 commits into
Python-Markdown:masterfrom
oprypin:admkeep
Dec 30, 2020
Merged

Don't wrongly discard text immediately before an admonition#1092
waylan merged 3 commits into
Python-Markdown:masterfrom
oprypin:admkeep

Conversation

@oprypin

@oprypin oprypin commented Dec 30, 2020

Copy link
Copy Markdown
Contributor
foo
**foo**
!!! note "Admonition"

In the previous state, the "foo" text would be completely obliterated, but now it will be kept, and the admonition will be rendered as well.

@oprypin

oprypin commented Dec 30, 2020

Copy link
Copy Markdown
Contributor Author

This is a bug, but it's not obvious what behavior is the correct one.
This PR is the more pragmatic one, and #1093 is an alternative.
One of the two should be chosen.

```markdown
foo
**foo**
!!! note "Admonition"
```

In the previous state, the "foo" text would be completely obliterated, but now it will be kept, and the admonition will be rendered as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants