def getHtml(diffData):
    """ This method convertes git diff data to html color code
    """
openTag = "<span style='font-size: .80em; color: "
openTagEnd = ";font-family: courier, arial, helvetica, sans-serif;'>"
nbsp = '\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0'
return ''.join([('%s%s%s%s%s</span><br>' % (openTag, '#ff0000' if line.
    startswith('-') else '#007900' if line.startswith('+') else '#000000',
    openTagEnd, nbsp * line.count('\t'), line)) for line in diffData])
Git-diff в HTML