def _doc_link(rawtext, text, options={}, content=[]):
 (has_explicit_title, title, slug) = split_explicit_title(text)
 twin_slugs = False
 post = None
 for p in doc_role.site.timeline:
  if (p.meta('slug') == slug):
   if (post is None):
    post = p
   else:
    twin_slugs = True
    break
 try:
  if (post is None):
   raise ValueError
 except ValueError:
  return (False, False, None, None, slug)
 if (not has_explicit_title):
  title = post.title()
 permalink = post.permalink()
 return (True, twin_slugs, title, permalink, slug)

def _doc_link ( rawtext , text , options = { } , content = [ ] ) : ( has_explicit_title , title , slug ) = split_explicit_title ( text ) twin_slugs = False post = None for p in doc_role . site . timeline : if ( p . meta ( 'slug' ) == slug ) : if ( post is None ) : post = p else : twin_slugs = True break try : if ( post is None ) : raise ValueError except ValueError : return ( False , False , None , None , slug ) if ( not has_explicit_title ) : title = post . title ( ) permalink = post . permalink ( ) return ( True , twin_slugs , title , permalink , slug )
handle the doc role .