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

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


�8�c@s�ddlmZejjdddg�ddlmZmZddlmZddlm	Z	ddl
mZmZm
Z
dd	lmZd
Zd�ZdS(
i�(tdemandimporttpkgutilt
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" />cs�|jd�}t|kr5|t}||jd<n|j�}tj|�rTdS|jtjd�}y#t|j	�|d dt
�}WnZttfk
r�yt
|d dt
�}Wq�ttfk
r�tdt
�}q�nXtd|�}t|||�}	|	|	jd� }	|	|	jd�d}	d	�|	j�D���fd
�|jd<|j|}
|
jdd
�}||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

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.