File: //usr/lib/python2.7/dist-packages/hgext/highlight/__init__.pyc
ó
ÛXc @@ s• d Z d d l m Z d d l m Z d d l m Z m Z m Z d d l m
Z
m Z m Z d Z
d „ Z d „ Z d
„ Z d „ Z d „ Z d
S( st syntax highlighting for hgweb (requires Pygments)
It depends on the Pygments syntax highlighting library:
http://pygments.org/
There are the following configuration options::
[web]
pygments_style = <style> (default: colorful)
highlightfiles = <fileset> (default: size('<5M'))
highlightonlymatchfilename = <bool> (default False)
``highlightonlymatchfilename`` will only highlight files if their type could
be identified by their filename. When this is not enabled (the default),
Pygments will try very hard to identify the file type from content and any
match (even matches with a low confidence score) will be used.
i ( t absolute_importi ( t highlight( t commont webcommandst webutil( t encodingt
extensionst filesets ships-with-hg-corec
C@ s¿ | j d d d ƒ } | j d d d ƒ } | j d d t ƒ } | j ƒ } t j | ƒ } t j | d | j ƒ g d d ƒ} | j ƒ t j | | ƒ k r» t
j | | | | d | ƒn d S(
Nt webt pygments_stylet colorfult highlightfiless size('<5M')t highlightonlymatchfilenamet subsett statust guessfilenameonly( t configt
configboolt Falset changectxR t parset matchctxt patht Nonet getsetR t
pygmentize(
R t fieldt fctxt tmplt stylet exprt filenameonlyt ctxt treet mctx( ( s<