Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/hgext/highlight/__init__.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Pc@srdZddlZddlmZmZmZddlmZmZdZ	d�Z
d�Zd�Zd	�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
Rtannotateline(R
RRtfilectxtrepoRRR(RR	treqRRRR((s</sys/lib/python2.7/site-packages/hgext/highlight/__init__.pytannotate_highlight+scCsQ|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__.pytgenerate_css3s
cCsCtjtdt�tjtdt�tt_tjjd�dS(Nt
_filerevisiontannotatethighlightcss(	RtwrapfunctionRRRR"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			

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.