Definition at line 416 of file httpdomain.py.
◆ result_nodes()
def httpdomain.httpdomain.HTTPXRefMethodRole.result_nodes |
( |
|
self, |
|
|
|
document, |
|
|
|
env, |
|
|
|
node, |
|
|
|
is_ref |
|
) |
| |
Definition at line 418 of file httpdomain.py.
418 def result_nodes(self, document, env, node, is_ref):
419 method = node[0][0].lower()
420 rawsource = node[0].rawsource
421 config = env.domains[
'http'].env.config
422 if method
not in METHOD_REFS:
423 if not config[
'http_strict_mode']:
424 return [nodes.emphasis(method, method)], []
425 reporter = document.reporter
426 msg = reporter.error(
'%s is not valid HTTP method' % method,
428 prb = nodes.problematic(method, method)
430 url = str(METHOD_REFS[method])
432 return [nodes.emphasis(method, method)], []
433 node = nodes.reference(rawsource, method.upper(), refuri=url)
The documentation for this class was generated from the following file: