parameters: ( self, word )
return_statement: return html_quote( word )
docstring: Analyze a simple word to detect cross-references and markup.
docstring_summary: Analyze a simple word to detect cross-references and markup.
docstring_tokens: Analyze a simple word to detect cross - references and markup .
function: def  make_html_word( self, word ):
          """Analyze a simple word to detect cross-references and markup."""
          # handle cross-references
          m = re_crossref.match( word )
          if m:
              try:
                  name = m.group( 'name' )
                  rest = m.group( 'rest' )
                  block = self.identifiers[name]
                  url   = self.make_block_url( block )
                  # display `foo[bar]' as `foo'
                  name = re.sub( r'\[.*\]', '', name )
                  # normalize url, following RFC 3986
                  url = string.replace( url, "[", "(" )
                  url = string.replace( url, "]", ")" )
  
                  try:
                      # for sections, display title
                      url = ( '&lsquo;<a href="' + url + '">'
                              + block.title + '</a>&rsquo;'
                              + rest )
                  except:
                      url = ( '<a href="' + url + '">'
                              + name + '</a>'
                              + rest )
  
                  return url
              except:
                  # we detected a cross-reference to an unknown item
                  sys.stderr.write( "WARNING: undefined cross reference"
                                    + " '" + name + "'.\n" )
                  return '?' + name + '?' + rest
  
          # handle markup for italic and bold
          m = re_italic.match( word )
          if m:
              name = m.group( 1 )
              rest = m.group( 2 )
              return '<i>' + name + '</i>' + rest
  
          m = re_bold.match( word )
          if m:
              name = m.group( 1 )
              rest = m.group( 2 )
              return '<b>' + name + '</b>' + rest
  
          return html_quote( word )
function_tokens: def make_html_word ( self , word ) : # handle cross-references m = re_crossref . match ( word ) if m : try : name = m . group ( 'name' ) rest = m . group ( 'rest' ) block = self . identifiers [ name ] url = self . make_block_url ( block ) # display `foo[bar]' as `foo' name = re . sub ( r'\[.*\]' , '' , name ) # normalize url, following RFC 3986 url = string . replace ( url , "[" , "(" ) url = string . replace ( url , "]" , ")" ) try : # for sections, display title url = ( '&lsquo;<a href="' + url + '">' + block . title + '</a>&rsquo;' + rest ) except : url = ( '<a href="' + url + '">' + name + '</a>' + rest ) return url except : # we detected a cross-reference to an unknown item sys . stderr . write ( "WARNING: undefined cross reference" + " '" + name + "'.\n" ) return '?' + name + '?' + rest # handle markup for italic and bold m = re_italic . match ( word ) if m : name = m . group ( 1 ) rest = m . group ( 2 ) return '<i>' + name + '</i>' + rest m = re_bold . match ( word ) if m : name = m . group ( 1 ) rest = m . group ( 2 ) return '<b>' + name + '</b>' + rest return html_quote ( word )