--- a/ext/rest.py Fri Jan 22 14:40:14 2010 +0100
+++ b/ext/rest.py Fri Jan 22 14:40:29 2010 +0100
@@ -96,7 +96,7 @@
lineno - state_machine.input_offset - 1)
#source_dir = os.path.dirname(os.path.abspath(source))
fid = arguments[0]
- for lang in chain((context.req.lang, context.vreg.property_value('ui.language')),
+ for lang in chain((context._cw.lang, context.vreg.property_value('ui.language')),
context.config.available_languages()):
rid = '%s_%s.rst' % (fid, lang)
resourcedir = context.config.locate_doc_file(rid)
@@ -166,7 +166,7 @@
lexer = get_lexer_by_name('text')
parsed = highlight(u'\n'.join(content), lexer, _PYGMENTS_FORMATTER)
context = state.document.settings.context
- context.req.add_css('pygments.css')
+ context._cw.add_css('pygments.css')
return [nodes.raw('', parsed, format='html')]
pygments_directive.arguments = (1, 0, 1)