o ]Lbc @sddlmZddlmZejgdddlmZmZddlm Z e $ddl Z ddl Z ddl Z ddlZ ddlZ e jD]Zq@Wdn1sMwYe jZe jjZe jjZe jjZe jjZe jjZdZd d d ZdS) )absolute_import) demandimport)spkgutils pkg_resourcess__main__)encodingpycompat) stringutilNsC Fc sh|d|jd}t|vr|t}||jd<|}t|r"dSdD] }||vr0||d}q$|t t j d}zt | } t | |dddd} Wn*t tfyy|r]YdSz t|dddd} Wn t tfyvYYdSwYnwt| trdStdt |d } t|| | } d d | Dfd d |jd<|j|} | dd}||j|<dS)Nsheader) replaceiF)stripnlT)nowrapstylecss$|] }|ttjdVqdS)r N)encodersysstrr).0sr;/usr/lib/python3/dist-packages/hgext/highlight/highlight.py \s  zpygmentize..cstS)N)next)x coloriterrraszpygmentize..scolorizes line|escapes line|colorize)loadcache SYNTAX_CSSdatarbinaryr decoderrrpathguess_lexer_for_filename ClassNotFound ValueError guess_lexer isinstance TextLexer HtmlFormatter highlight splitlines_filters)fieldfctxrtmplguessfilenameonly old_header new_headertextcr"lexer formatter colorizedoldlnewlrrr pygmentize.sJ         r:)F) __future__r mercurialrIGNORESupdaterrmercurial.utilsr deactivatedpygmentspygments.formatterspygments.lexerspygments.plugin pygments.utilpluginfind_plugin_lexersunusedr*utilr$lexersr&r#r( formattersr)rr:rrrrs0