Skip to content

Commit bfdec07

Browse files
committed
Skipped document with empty source
1 parent cf59a34 commit bfdec07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sphinxnotes/snippet/picker.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ 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 is None or doctree.source == "":
30+
logger.debug('Skipped document with empty source')
31+
return []
32+
2933
snippets = []
3034

3135
# Pick document

0 commit comments

Comments
 (0)