def doc_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
 (success, twin_slugs, title, permalink, slug) = _doc_link(rawtext, text, options, content)
 if success:
  if twin_slugs:
   inliner.reporter.warning('More than one post with the same slug. Using "{0}"'.format(permalink))
   LOGGER.warn('More than one post with the same slug. Using "{0}" for doc role'.format(permalink))
  node = make_link_node(rawtext, title, permalink, options)
  return ([node], [])
 else:
  msg = inliner.reporter.error('"{0}" slug doesn\'t exist.'.format(slug), line=lineno)
  prb = inliner.problematic(rawtext, rawtext, msg)
  return ([prb], [msg])

def doc_role ( name , rawtext , text , lineno , inliner , options = { } , content = [ ] ) : ( success , twin_slugs , title , permalink , slug ) = _doc_link ( rawtext , text , options , content ) if success : if twin_slugs : inliner . reporter . warning ( 'More than one post with the same slug. Using "{0}"' . format ( permalink ) ) LOGGER . warn ( 'More than one post with the same slug. Using "{0}" for doc role' . format ( permalink ) ) node = make_link_node ( rawtext , title , permalink , options ) return ( [ node ] , [ ] ) else : msg = inliner . reporter . error ( '"{0}" slug doesn\'t exist.' . format ( slug ) , line = lineno ) prb = inliner . problematic ( rawtext , rawtext , msg ) return ( [ prb ] , [ msg ] )
handle the doc role .