From: David A. <dav...@us...> - 2004-06-23 02:17:37
|
Update of /cvsroot/docutils/docutils/docutils/parsers/rst/directives In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13694 Modified Files: body.py Log Message: Fix the line numbering of nodes produced by line_block directives. This is a total shot-in-the-dark, since it's unclear why lineno is 97 and content_offset is the right line number. Without some description of the protocol I can't really know, but it seems to be working... for now. Index: body.py =================================================================== RCS file: /cvsroot/docutils/docutils/docutils/parsers/rst/directives/body.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- body.py 18 Jun 2004 21:35:35 -0000 1.17 +++ body.py 23 Jun 2004 02:17:11 -0000 1.18 @@ -15,7 +15,25 @@ from docutils import nodes from docutils.parsers.rst import directives - +# Directive Handler Functions +# +# What they do is blah blah +# +# They are called by blah blah after being looked up blah blah +# +# Parameter Required Type Role +# ============== ============= ============================= +# name str ??? +# arguments ??? ??? +# options ??? ??? +# content ??? ??? +# lineno ??? ??? +# content_offset ??? ??? +# block_text ??? ??? +# state ??? ??? +# state_machine ??? ??? +# node_class ??? ??? + def topic(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine, node_class=nodes.topic): @@ -74,6 +92,7 @@ text = '\n'.join(content) text_nodes, messages = state.inline_text(text, lineno) node = node_class(text, '', *text_nodes, **options) + node.line = content_offset return [node] + messages line_block.options = {'class': directives.class_option} |