def _docf(self, tag, val):
if tag == '<STR_LIT:type>':<EOL><INDENT>return '<STR_LIT>'.format(val)<EOL><DEDENT>elif tag == '<STR_LIT>':<EOL><INDENT>if self.args.route_method:<EOL><INDENT>return '<STR_LIT>' % self.args.route_method.format(<EOL>ns=self.cur_namespace.name, route=fmt_func(val))<EOL><DEDENT>else:<EOL><INDENT>return val<EOL><DEDENT><DEDENT>elif tag == '<STR_LIT>':<EOL><INDENT>anchor, link = val.rsplit('<STR_LIT:U+0020>', <NUM_LIT:1>)<EOL>return '<STR_LIT>'.format(anchor, link)<EOL><DEDENT>elif tag == '<STR_LIT>':<EOL><INDENT>if val == '<STR_LIT:null>':<EOL><INDENT>return '<STR_LIT:None>'<EOL><DEDENT>elif val == '<STR_LIT:true>' or val == '<STR_LIT:false>':<EOL><INDENT>return '<STR_LIT>'.format(val.capitalize())<EOL><DEDENT>else:<EOL><INDENT>return val<EOL><DEDENT><DEDENT>elif tag == '<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'.format(val)<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError('<STR_LIT>' % tag)<EOL><DEDENT>
Callback used as the handler argument to process_docs(). This converts
Stone doc references to Sphinx-friendly annotations.