diff options
Diffstat (limited to 'sphinx/writers/websupport.py')
-rw-r--r-- | sphinx/writers/websupport.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/writers/websupport.py b/sphinx/writers/websupport.py index 84af925ed..fbd3c1ef5 100644 --- a/sphinx/writers/websupport.py +++ b/sphinx/writers/websupport.py @@ -10,12 +10,12 @@ """ from sphinx.writers.html import HTMLTranslator +from sphinx.util.websupport import is_commentable class WebSupportTranslator(HTMLTranslator): """ Our custom HTML translator. """ - commentable_nodes = ['paragraph', 'literal_block'] def __init__(self, builder, *args, **kwargs): HTMLTranslator.__init__(self, builder, *args, **kwargs) @@ -26,13 +26,13 @@ class WebSupportTranslator(HTMLTranslator): self.cur_node = None def dispatch_visit(self, node): - if node.__class__.__name__ in self.commentable_nodes: + if is_commentable(node): self.handle_visit_commentable(node) HTMLTranslator.dispatch_visit(self, node) def dispatch_departure(self, node): HTMLTranslator.dispatch_departure(self, node) - if node.__class__.__name__ in self.commentable_nodes: + if is_commentable(node): self.handle_depart_commentable(node) def handle_visit_commentable(self, node): |