Came across this using an older version of docutils
with Zope 2.7, but still appears in latest snapshot.
url option for raw directive cannot have file option,
but this is then required under the url processing
in docutils/parsers/rst/directives/misc.py, line 108
appears to be at fault. The elif block (lines 97 - 108
raw_file = urlopen(options['url'])
except (URLError, IOError, OSError), error:
severe = state_machine.reporter.severe(
'Problems with "%s" directive URL "%
% (name, options['url'], error),
text = raw_file.read()
attributes['source'] = options['file']
the last line here presumes a file option, where I
think it should presume the url option. changing this
attributes['source'] = options['url']
works for me (limited test, using raw:: html)! I note
that this option doesn't get tested in the test suite,
other than to test that using the file and url options
together is an error - presumably because no connection
to a specified URL can be relied on. Can't think of a
way round that though.
First bug report - apols if bad format. Cheers, Craig
Log in to post a comment.