summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sphinx/util/websupport.py2
-rw-r--r--sphinx/writers/websupport.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/websupport.py b/sphinx/util/websupport.py
index 5535da56..65c48296 100644
--- a/sphinx/util/websupport.py
+++ b/sphinx/util/websupport.py
@@ -10,4 +10,4 @@
def is_commentable(node):
#return node.__class__.__name__ in ('paragraph', 'literal_block')
- return node.__class__.__name__ == 'paragraph' and hasattr(node, 'uid')
+ return node.__class__.__name__ == 'paragraph'
diff --git a/sphinx/writers/websupport.py b/sphinx/writers/websupport.py
index 85f8406e..bc48c959 100644
--- a/sphinx/writers/websupport.py
+++ b/sphinx/writers/websupport.py
@@ -23,7 +23,7 @@ class WebSupportTranslator(HTMLTranslator):
self.comment_class = 'sphinx-has-comment'
def dispatch_visit(self, node):
- if is_commentable(node):
+ if is_commentable(node) and hasattr(node, 'uid'):
self.handle_visit_commentable(node)
HTMLTranslator.dispatch_visit(self, node)