diff --git a/docs/change_log/release-3.4.md b/docs/change_log/release-3.4.md index bfa807560..3a299ba3a 100644 --- a/docs/change_log/release-3.4.md +++ b/docs/change_log/release-3.4.md @@ -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 `
` handling of
   `PrettifyTreeprocessor` (#1261, #1263).
+* Fix XML deprecation warnings.
diff --git a/markdown/extensions/admonition.py b/markdown/extensions/admonition.py
index 6d395f395..ce8492f4a 100644
--- a/markdown/extensions/admonition.py
+++ b/markdown/extensions/admonition.py
@@ -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 `
  • ` or `
    `. # 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