Skip to content
Permalink
Browse files

update sphinx extension

  • Loading branch information...
sdpython committed Jul 14, 2016
1 parent 0e97ef9 commit 2484ab59cc6b6794e30536947b8869ad46018d3d
@@ -60,6 +60,7 @@ def test_blocre(self):
.. blocref::
:title: first todo
:tag: bug
:lid: id3
this code shoud appear___
@@ -108,6 +109,7 @@ def test_blocreflist(self):
.. blocref::
:title: first todo
:tag: freg
:lid: id3
this code shoud appear___
@@ -107,7 +107,7 @@ def run(self):
env = self.state.document.settings.env if hasattr(
self.state.document.settings, "env") else None
docname = None if env is None else env.docname
if docname is None:
if docname is not None:
docname = docname.replace("\\", "/").split("/")[-1]
legend = "{0}:{1}".format(docname, lineno)
else:
@@ -164,8 +164,8 @@ def run(self):
targetid = 'indexbrefe%s%s' % (
breftag, env.new_serialno('indexbrefe%s' % breftag))
ids = [targetid]
targetnode = nodes.target(legend, legend, ids=ids)
# self.state.add_target(ids[0], legend, '', targetnode, lineno)
targetnode = nodes.target(legend, '', ids=ids)
self.state.add_target(targetid, '', targetnode, lineno)

# index node
index = self.options.get('index', None)
@@ -79,7 +79,7 @@ def run(self):
env = self.state.document.settings.env if hasattr(
self.state.document.settings, "env") else None
docname = None if env is None else env.docname
if docname is None:
if docname is not None:
docname = docname.replace("\\", "/").split("/")[-1]
legend = "{0}:{1}".format(docname, lineno)
else:
@@ -136,8 +136,8 @@ def run(self):
targetid = 'indexmathe-%s%s' % (mathtag,
env.new_serialno('indexmathe%s' % mathtag))
ids = [targetid]
targetnode = nodes.target(legend, legend, ids=ids[0])
# self.state.add_target( ids[0], legend, '', targetnode, lineno)
targetnode = nodes.target(legend, '', ids=ids[0])
self.state.add_target(targetid, '', targetnode, lineno)

# index node
index = self.options.get('index', None)
@@ -107,7 +107,7 @@ def run(self):
env = self.state.document.settings.env if hasattr(
self.state.document.settings, "env") else None
docname = None if env is None else env.docname
if docname is None:
if docname is not None:
docname = docname.replace("\\", "/").split("/")[-1]
legend = "{0}:{1}".format(docname, lineno)
else:
@@ -213,7 +213,7 @@ def run(self):

if env is not None:
targetid = 'indextodoe-%s' % env.new_serialno('indextodoe')
targetnode = nodes.target(legend, legend, ids=[targetid])
targetnode = nodes.target('', legend, ids=[targetid])
self.state.add_target(targetid, '', targetnode, lineno)

# index node

0 comments on commit 2484ab5

Please sign in to comment.
You can’t perform that action at this time.