From 8da059b401ddc4c9e6ce4ff2d19d9f365fd435a8 Mon Sep 17 00:00:00 2001 From: realazthat Date: Tue, 16 Jul 2024 02:48:26 -0400 Subject: [PATCH] Fix conditional check for children in _GetRefBlockName() --- mdreftidy/mdreftidy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdreftidy/mdreftidy.py b/mdreftidy/mdreftidy.py index 1a7ab96..d7a5312 100644 --- a/mdreftidy/mdreftidy.py +++ b/mdreftidy/mdreftidy.py @@ -154,7 +154,7 @@ def _GetRefBlockName(token: LinkReferenceDefinitionBlock) -> str: f'\n token:\n{textwrap.indent(_DumpTokenInfo(token, ancestors=None), " ")}' ) children: Optional[Tuple[Token, ...]] = _GetChildren(token) - if children is None: + if children is not None: for child in children: if not isinstance(child, LinkReferenceDefinition): raise ValueError(