Hi,
I am trying hard to figure out whether and in casse how a parsed-literal 
block uses code highlight.

My aim is to use it to show function signatures in a code block instead of 
the way domains does. To this extent I have implement my own domain and 
modify in a way I can input

..mydom:function::int ff()
                  int ff(int i)


  some text goes here



and get a layout as 

----------------------------

Function ff

int ff();
int ff(int i);

Description:

some text goes here


----------------------------

To do this I just create a literal_block node and pass to it the text I 
want to show, set the language and that'it.

Now I have also types in the function arguments that should be linked to 
their definitions, as a class for instance. Therefore I need to mimic what 
parsed_literal does: I use a literal_block but applied on parsed text 
nodes. The code looks like:

text = '\n'.join([s for s in sig_list])

lineno = self.state_machine.abs_line_number()
textnodes, messages = self.state.inline_text(text, lineno)
sign_block = nodes.literal_block(text,'',*textnodes )
sign_block['language'] = 'c'
sign_block['classes'] = ['highlight']
sign_block['highlight_args'] = {}
container_node = nodes.container('', literal_block=True,
                                 classes=['literal-block-wrapper'])
container_node += sign_block



Now, no matter how I play with the language, highlight and classes I can 
not get any syntax highlight out of a literal_block. What am I missing?


-- 
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 https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to