��Pc@srdZddlZddlmZmZmZddlmZmZdZ d�Z
d�Zd�Zd �Z
dS(
s�syntax highlighting for hgweb (requires Pygments)
It depends on the Pygments syntax highlighting library:
http://pygments.org/
There is a single configuration option::
[web]
pygments_style = <style>
The default is 'colorful'.
i�N(twebcommandstwebutiltcommon(t
extensionstencodingtinternalcCshdj|ddtj��}d|krX|jddd�}tjd|||�n||||�S( NttmimetypeRthtmltwebtpygments_styletcolorfultfileline(tjoinRtconfigt highlightt
pygmentize(torigR ttmpltfctxtmttstyle((s</sys/lib/python2.7/site-packages/hgext/highlight/__init__.pytfilerevision_highlights
cCs}dj|ddtj��}d|krmtj|j|�}|jddd�}tjd|||�n||||�S( NRRRRR R
Rtannotateline(R
RRtfilectxtrepoRRR(RR treqRRRR((s</sys/lib/python2.7/site-packages/hgext/highlight/__init__.pytannotate_highlight+scCsQ|jddd�}tjd|�}|jtjd�d||jd�gS(NR R
RRstext/csss/* pygments_style = %s */
R(RRt
HtmlFormattertrespondRtHTTP_OKtget_style_defs(R RRtpg_styletfmter((s</sys/lib/python2.7/site-packages/hgext/highlight/__init__.pytgenerate_css3s
cCsCtjtdt�tjtdt�tt_tjjd�dS(Nt
_filerevisiontannotatethighlightcss( RtwrapfunctionRRRR"R%t__all__tappend(((s</sys/lib/python2.7/site-packages/hgext/highlight/__init__.pytextsetup:s
(t__doc__Rtmercurial.hgwebRRRt mercurialRRt
testedwithRRR"R)(((s</sys/lib/python2.7/site-packages/hgext/highlight/__init__.pyt<module>s
|