Skip to content

Commit

Permalink
Fix XML deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser authored and waylan committed Jul 17, 2023
1 parent 1337d08 commit 93054dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 93054dd

Please sign in to comment.