parameters: (text)
return_statement: return html
docstring: Return HTML Code with syntax hightlighting
docstring_summary: Return HTML Code with syntax hightlighting
docstring_tokens: Return HTML Code with syntax hightlighting
function: def colorize(text):
    """Return HTML Code with syntax hightlighting
    """
    # Escape xml before adding html tags
    html = escape(text)
    html = html.replace(' ', NBSP)
    html = html.replace('\t', NBSP_TAB)
    # Colorize comments
    pattern = re.compile(r'#.*')
    html = pattern.sub(colorizeTag, html)
    # Colorize tags
    pattern = re.compile(r'&lt;.*?&gt;')
    html = pattern.sub(colorizeTag, html)
    # Colorize strings
    pattern = re.compile(r'\".*?\"')
    html = pattern.sub(colorizeTag, html)
    html = html.replace(os.linesep, os.linesep+"<br/>")
    return html
function_tokens: def colorize ( text ) : # Escape xml before adding html tags html = escape ( text ) html = html . replace ( ' ' , NBSP ) html = html . replace ( '\t' , NBSP_TAB ) # Colorize comments pattern = re . compile ( r'#.*' ) html = pattern . sub ( colorizeTag , html ) # Colorize tags pattern = re . compile ( r'&lt;.*?&gt;' ) html = pattern . sub ( colorizeTag , html ) # Colorize strings pattern = re . compile ( r'\".*?\"' ) html = pattern . sub ( colorizeTag , html ) html = html . replace ( os . linesep , os . linesep + "<br/>" ) return html