skip Xpath nodes in latex build to avoid build errors

This commit is contained in:
Valdir Stumm Junior 2017-06-14 15:10:43 -03:00
parent bfcc2395e3
commit 7f5068373a
1 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from docutils import nodes
from sphinx.util.compat import Directive
from sphinx.search import SkipNode
class xpath_demo_node(nodes.Element):
@ -29,11 +30,17 @@ def setup(app):
html=(
visit_xpath_demo_node,
depart_xpath_demo_node,
)
),
# latex build are failing, so let's skip the xpath nodes
latex=(skip_node, None),
)
app.add_directive('xpathdemo', XPathDemoDirective)
def skip_node(self, node):
raise SkipNode
def visit_xpath_demo_node(self, node):
try:
with open(node.form_template) as fp: