�8�c@s�ddlmZejjdddg�ddlmZmZddlmZddlm Z ddl
mZmZm
Z
dd lmZd
Zd�ZdS(
i�(tdemandimporttpkgutilt
pkg_resourcest__main__(tutiltencoding(t highlight(t
ClassNotFound(tguess_lexertguess_lexer_for_filenamet TextLexer(t
HtmlFormattersC
<link rel="stylesheet" href="{url}highlightcss" type="text/css" />cs�|jd�}t|kr5|t}||jd<n|j�}tj|�rTdS|jtjd�}y#t|j �|d dt
�}WnZttfk
r�yt
|d dt
�}Wq�ttfk
r�tdt
�}q�nXtd|�}t|||�} | | jd� } | | jd�d} d �| j�D���fd
�|jd<|j|}
|
jdd
�}||j|<dS(Ntheadertreplaceitstripnltstyles
</pre>s<pre>icss$|]}|jtjd�VqdS(R
N(tencodeR(t.0ts((s=/sys/lib/python2.7/site-packages/hgext/highlight/highlight.pys <genexpr>7scs
�j�S(N(tnext(tx(t coloriter(s=/sys/lib/python2.7/site-packages/hgext/highlight/highlight.pyt<lambda>:stcolorizesline|escapes
line|colorize(tloadt
SYNTAX_CSStcachetdataRtbinarytdecodeRR tpathtFalseRt
ValueErrorRR
RRtfindt
splitlinestfiltersR
(tfieldtfctxRttmplt
old_headert
new_headerttexttlexert formattert colorizedtoldltnewl((Rs=/sys/lib/python2.7/site-packages/hgext/highlight/highlight.pyt
pygmentizes4
N(t mercurialRtignoretextendRRtpygmentsRt
pygments.utilRtpygments.lexersRR R
tpygments.formattersRRR/(((s=/sys/lib/python2.7/site-packages/hgext/highlight/highlight.pyt<module>s
|