Skip to content

Commit

Permalink
Fixed Python 3.12 DeprecationWarning (#2055)
Browse files Browse the repository at this point in the history
Testing an element's truth value will raise an exception in future versions.
  • Loading branch information
vedranmiletic committed Jun 4, 2023
1 parent 7c13bda commit 0b9345a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymdownx/details.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def parse_content(self, parent, block):
# to be under it, then the content's is 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')
Expand Down

0 comments on commit 0b9345a

Please sign in to comment.