@core_helper
def html_auto_link(data):
 LINK_FNS = {'tag': tag_link, 'group': group_link, 'dataset': dataset_link, 'package': dataset_link}
 def makelink(matchobj):
  obj = matchobj.group(1)
  name = matchobj.group(2)
  title = ('%s:%s' % (obj, name))
  return LINK_FNS[obj]({'name': name.strip('"'), 'title': title})
 def link(matchobj):
  return ('<a href="%s" target="_blank" rel="nofollow">%s</a>' % (matchobj.group(1), matchobj.group(1)))
 def process(matchobj):
  data = matchobj.group(2)
  data = RE_MD_INTERNAL_LINK.sub(makelink, data)
  data = RE_MD_EXTERNAL_LINK.sub(link, data)
  return (matchobj.group(1) + data)
 data = RE_MD_GET_INNER_HTML.sub(process, data)
 return data

@ core_helper def html_auto_link ( data ) : LINK_FNS = { 'tag' : tag_link , 'group' : group_link , 'dataset' : dataset_link , 'package' : dataset_link } def makelink ( matchobj ) : obj = matchobj . group ( 1 ) name = matchobj . group ( 2 ) title = ( '%s:%s' % ( obj , name ) ) return LINK_FNS [ obj ] ( { 'name' : name . strip ( '"' ) , 'title' : title } ) def link ( matchobj ) : return ( '<a href="%s" target="_blank" rel="nofollow">%s</a>' % ( matchobj . group ( 1 ) , matchobj . group ( 1 ) ) ) def process ( matchobj ) : data = matchobj . group ( 2 ) data = RE_MD_INTERNAL_LINK . sub ( makelink , data ) data = RE_MD_EXTERNAL_LINK . sub ( link , data ) return ( matchobj . group ( 1 ) + data ) data = RE_MD_GET_INNER_HTML . sub ( process , data ) return data
linkifies html tag converted to a tag link dataset converted to a dataset link group converted to a group link http:// converted to a link .