Dear Docutils developers,
I want to tackle the system message problems listed in BUGS.txt
> * Line numbers [and "source"] in system messages are inconsistent.
> In text inserted by the "include" directive, errors are often not
> reported with the correct "source" or "line" numbers.
but need some consensus about the way to go:
> - Perhaps all Reporter calls need "source" and "line" keyword arguments?
Alternatively, give `document.reporter` access to the state machine
instance `document.statemachine` and extract the "source" and "line" info
from `statemachine.input_lines`. Except for special cases, there is even
no need to call with "line": During parsing, `document.statemachine`
knows the current line number. For system messages generated after the
parsing is completed (i.e. by transforms or the writer) "line" info
should be present in the doctree elements.
> - Elements' .line assignments should be checked. (Assign to .source
> too? Add a set_info method? To what?)
> * .. _none source:
> Quite a few nodes are getting a "None" source attribute as well. In
> particular, see the bodies of definition lists.
The "source" (and line number in the source) could either be added
explicitely to the elements or determined from the “raw” line number by
So, should conversion of “raw” line number to "line" and "source" be done
early on (in/before calls to `document.reporter` and while setting node
attributes) or by the reporter?
Get latest updates about Open Source Projects, Conferences and News.