def ghissue_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
 try:
  issue_num = int(text)
  if (issue_num <= 0):
   raise ValueError
 except ValueError:
  msg = inliner.reporter.error(('GitHub issue number must be a number greater than or equal to 1; "%s" is invalid.' % text), line=lineno)
  prb = inliner.problematic(rawtext, rawtext, msg)
  return ([prb], [msg])
 app = inliner.document.settings.env.app
 if ('pull' in name.lower()):
  category = 'pull'
 elif ('issue' in name.lower()):
  category = 'issues'
 else:
  msg = inliner.reporter.error(('GitHub roles include "ghpull" and "ghissue", "%s" is invalid.' % name), line=lineno)
  prb = inliner.problematic(rawtext, rawtext, msg)
  return ([prb], [msg])
 node = make_link_node(rawtext, app, category, str(issue_num), options)
 return ([node], [])

def ghissue_role ( name , rawtext , text , lineno , inliner , options = { } , content = [ ] ) : try : issue_num = int ( text ) if ( issue_num <= 0 ) : raise ValueError except ValueError : msg = inliner . reporter . error ( ( 'GitHub issue number must be a number greater than or equal to 1; "%s" is invalid.' % text ) , line = lineno ) prb = inliner . problematic ( rawtext , rawtext , msg ) return ( [ prb ] , [ msg ] ) app = inliner . document . settings . env . app if ( 'pull' in name . lower ( ) ) : category = 'pull' elif ( 'issue' in name . lower ( ) ) : category = 'issues' else : msg = inliner . reporter . error ( ( 'GitHub roles include "ghpull" and "ghissue", "%s" is invalid.' % name ) , line = lineno ) prb = inliner . problematic ( rawtext , rawtext , msg ) return ( [ prb ] , [ msg ] ) node = make_link_node ( rawtext , app , category , str ( issue_num ) , options ) return ( [ node ] , [ ] )
link to a github issue .