From 08cf46cbc90c43a164871fbb52b039cb0a024862 Mon Sep 17 00:00:00 2001 From: tk0miya Date: Sun, 24 Aug 2014 12:28:37 +0900 Subject: [PATCH] Fix #1509 TODO extension not compatible with websupport websupport assigns UID to every node on reading phase and reads it on writing phase. but `todolist` directive generates new paragraph node on resolving phase. This problem will occur any extensions that generate paragraph nodes on resolving phase. This fix changes websupport ignores paragraph node not having UIDs. --- sphinx/util/websupport.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinx/util/websupport.py b/sphinx/util/websupport.py index 050c528a2..5535da569 100644 --- a/sphinx/util/websupport.py +++ b/sphinx/util/websupport.py @@ -7,6 +7,7 @@ :license: BSD, see LICENSE for details. """ + def is_commentable(node): #return node.__class__.__name__ in ('paragraph', 'literal_block') - return node.__class__.__name__ == 'paragraph' + return node.__class__.__name__ == 'paragraph' and hasattr(node, 'uid')