Fix a case where content under admonitions weren't dettabbed properly#1102
Merged
waylan merged 1 commit intoPython-Markdown:masterfrom Feb 5, 2021
Merged
Conversation
1f282c6 to
b165cef
Compare
Collaborator
Author
|
I'm ignoring the "checklinks" failure. I feel that should be fixed in a separate issue. |
Member
|
I think you have an error in your first example. As is, it renders to <div class="admonition note">
<p class="admonition-title">Admonition</p>
</div>
<ul>
<li>
<p>Parent 1</p>
<ul>
<li>Child 1</li>
<li>Child 2</li>
</ul>
</li>
</ul>.. which is correct, The However, if you use proper indentation, like this: !!! note "Admonition"
- Parent 1
- Child 1
- Child 2Then we get the rather strange output: <div class="admonition note">
<p class="admonition-title">Admonition</p>
<ul>
<li>
<p>Parent 1</p>
<ul>
<li>Child 1<ul>
<li>Child 2</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>And yes that is a bug which needs fixing. So, thank you. |
Collaborator
Author
|
Sorry, that was a formatting issue for the comment, not the actual test or failure. |
Collaborator
Author
|
I've corrected the comment in the pull, but the issue is valid. |
mitya57
added a commit
to mitya57/markdown
that referenced
this pull request
Aug 11, 2021
PR Python-Markdown#1102 was included in 3.3.4, not 3.3.0. Also fix a typo in another changelog entry.
waylan
pushed a commit
that referenced
this pull request
Aug 11, 2021
PR #1102 was included in 3.3.4, not 3.3.0. Also fix a typo in another changelog entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Admonitions would not render the following case properly:
But would render this properly:
The problem stemmed from bad detabbing of the content, where in the first example, the child list was parsed like this:
This pull addresses the issue of ensuring that each block is processed properly so that content that is highly sensitive to indentation works correctly.