3.6 api update
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 22 Jan 2010 14:40:29 +0100
changeset 4334 dda74c345b06
parent 4333 7add8a73a168
child 4335 1314772c1183
3.6 api update
ext/rest.py
--- 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)