Skip to content

Commit 93054dd

Browse files
facelessuserwaylan
authored andcommitted
Fix XML deprecations
1 parent 1337d08 commit 93054dd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/change_log/release-3.4.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,4 @@ The following bug fixes are included in the 3.4 release:
111111
* Extension entry-points are only loaded if needed (#1216).
112112
* Added additional checks to the `<pre><code>` handling of
113113
`PrettifyTreeprocessor` (#1261, #1263).
114+
* Fix XML deprecation warnings.

markdown/extensions/admonition.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ def parse_content(self, parent, block):
7878
indent = 0
7979
while last_child is not None:
8080
if (
81-
sibling and block.startswith(' ' * self.tab_length * 2) and
82-
last_child and last_child.tag in ('ul', 'ol', 'dl')
81+
sibling is not None and block.startswith(' ' * self.tab_length * 2) and
82+
last_child is not None and last_child.tag in ('ul', 'ol', 'dl')
8383
):
8484

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

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

0 commit comments

Comments
 (0)