diff -r 4f28cb25b6c1 -r 8b8193046600 ext/rest.py --- a/ext/rest.py Tue Dec 08 10:24:44 2015 +0100 +++ b/ext/rest.py Tue Dec 08 17:59:54 2015 +0100 @@ -51,7 +51,7 @@ from cubicweb import UnknownEid from cubicweb.ext.html4zope import Writer -from cubicweb.web.views import vid_from_rset # XXX better not to import c.w.views here... +from cubicweb.web.views import vid_from_rset # XXX better not to import c.w.views here... # We provide our own parser as an attempt to get rid of # state machine reinstanciation @@ -70,6 +70,7 @@ LOGGER = getLogger('cubicweb.rest') + def eid_reference_role(role, rawtext, text, lineno, inliner, options={}, content=[]): try: @@ -99,6 +100,7 @@ return [nodes.reference(rawtext, utils.unescape(rest), refuri=ref, **options)], [] + def rql_role(role, rawtext, text, lineno, inliner, options={}, content=[]): """``:rql:```` or ``:rql:`:``` @@ -132,6 +134,7 @@ set_classes(options) return [nodes.raw('', content, format='html')], [] + def bookmark_role(role, rawtext, text, lineno, inliner, options={}, content=[]): """``:bookmark:```` or ``:bookmark:`:``` @@ -189,6 +192,7 @@ set_classes(options) return [nodes.raw('', content, format='html')], [] + def winclude_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """Include a reST file as part of the content of this reST file. @@ -254,6 +258,7 @@ winclude_directive.options = {'literal': directives.flag, 'encoding': directives.encoding} + class RQLTableDirective(Directive): """rql-table directive