On 2015-03-03 10:16, Matthew Woehlke wrote:
> I'm generating documentation from a combination of sphinx and my own
> markup format, for which I'm using a custom parser that I wrote.
> 
> This mostly works well, but I'm having problems getting links
> (addnodes.pending_xref) to sections in my documents to resolve.

Okay, I got it working...

> Here is how I create a section:
> 
>     name = nodes.fully_normalize_name(text)
> 
>     section_node = nodes.section()
>     section_node['level'] = level
>     section_node['names'].append(name)
>     section_node['ids'] = [nodes.make_id(name)]
> 
>     title_node = nodes.title(text)
>     title_node += nodes.Text(text, text)
>     section_node += title_node
> 
>     self.document.note_implicit_target(section_node, section_node)

...this needs to be note_explicit_target instead; sphinx does not ever
resolve implicit targets.

-- 
Matthew

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to