mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Correctly handle doctest blocks in HTML writer.
This commit is contained in:
parent
31e22c0351
commit
b5d7a5ff8f
@ -187,6 +187,9 @@ class HTMLTranslator(BaseTranslator):
|
|||||||
self.body.append(self.highlighter.highlight_block(node.rawsource, lang, linenos))
|
self.body.append(self.highlighter.highlight_block(node.rawsource, lang, linenos))
|
||||||
raise nodes.SkipNode
|
raise nodes.SkipNode
|
||||||
|
|
||||||
|
def visit_doctest_block(self, node):
|
||||||
|
self.visit_literal_block(node)
|
||||||
|
|
||||||
# overwritten
|
# overwritten
|
||||||
def visit_literal(self, node):
|
def visit_literal(self, node):
|
||||||
if len(node.children) == 1 and \
|
if len(node.children) == 1 and \
|
||||||
|
Loading…
Reference in New Issue
Block a user