From 1337d0891757e192165668d2606db36cf08e65a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vedran=20Mileti=C4=87?= Date: Sun, 4 Jun 2023 20:34:28 +0200 Subject: [PATCH] Fixed Python 3.12 DeprecationWarning Testing an element's truth value will raise an exception in future versions. --- markdown/extensions/admonition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/extensions/admonition.py b/markdown/extensions/admonition.py index 25bb19ed..6d395f39 100644 --- a/markdown/extensions/admonition.py +++ b/markdown/extensions/admonition.py @@ -76,7 +76,7 @@ def parse_content(self, parent, block): # to be under it, then the content's sibling is in the list. last_child = self.lastChild(sibling) indent = 0 - while last_child: + 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')