Skip to content

Fix XML deprecations #1356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/change_log/release-3.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ The following bug fixes are included in the 3.4 release:
* Extension entry-points are only loaded if needed (#1216).
* Added additional checks to the `<pre><code>` handling of
`PrettifyTreeprocessor` (#1261, #1263).
* Fix XML deprecation warnings.
6 changes: 3 additions & 3 deletions markdown/extensions/admonition.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ def parse_content(self, parent, block):
indent = 0
while last_child is not None:
if (
sibling and block.startswith(' ' * self.tab_length * 2) and
last_child and last_child.tag in ('ul', 'ol', 'dl')
sibling is not None and block.startswith(' ' * self.tab_length * 2) and
last_child is not None and last_child.tag in ('ul', 'ol', 'dl')
):

# The expectation is that we'll find an `<li>` or `<dt>`.
# We should get its last child as well.
sibling = self.lastChild(last_child)
last_child = self.lastChild(sibling) if sibling else None
last_child = self.lastChild(sibling) if sibling is not None else None

# Context has been lost at this point, so we must adjust the
# text's indentation level so it will be evaluated correctly
Expand Down