If my reStructuredText source document has an error, the filename is not printed, only "string". For example:
<string>:29: (ERROR/3) Unexpected indentation.
I'm not sure if this happens with other renderers too, I currently only use RST.
In renderers.py, for the ReStructuredText implementation, there is a call to docutils.core.publish_parts() (line 92). This function takes an optional parameter, "source_path", which is currently not used by Wok. Whatever this is set to will be displayed when there is an error, instead of the ambiguous "string" (as shown above). Both the documentation and my experimentation suggest this variable is for display purposes only, i.e. it doesn't actually try to reference that variable as a file.
I think this is a relatively easy fix: to the generic Renderer.render() function, I could add an additional optional variable that defaults to None. This variable would be "source_path" (or "source_filename" or even "slug"), and if set, would be passed through to the the underlying renderer if supported.
Maybe there's a better/cleaner way to do this that is less "invasive" to the API? I'm happy to work on this, but would like a little guidance on the best route to take. Thanks!