Skip to content

Commit 118954c

Browse files
committed
Fix condition of "skip document without source" again
1 parent 97fe9a7 commit 118954c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sphinxnotes/snippet/picker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ def pick(doctree:nodes.document) -> List[Tuple[Snippet,nodes.section]]:
2626
Pick snippets from document, return a list of snippet and the section
2727
it belongs to.
2828
"""
29-
if doctree.source == "":
30-
logger.debug('Skipped document with empty source')
29+
# FIXME: Why doctree.source is always None?
30+
if not doctree.attributes.get('source'):
31+
logger.debug('Skipped document without source')
3132
return []
3233

3334
snippets = []

0 commit comments

Comments
 (0)