Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.9/site-packages/hgext/highlight/__pycache__/ |
Upload File : |
a �+�bC � @ sl d Z ddlmZ ddlmZ ddlmZmZ ddlm Z m Z dZdd � Zd d� Z dd � Zdd� Zdd� ZdS )at 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. � )�absolute_import� )� highlight)�webcommands�webutil)� extensions�pycompats ships-with-hg-corec C sh | � ddd�}| � ddd�}| �ddd�}|�� }|�|�� j|�}||�� �rdtj|||||d� d S ) N� web� pygments_style� colorfuls highlightfiless size('<5M')s highlightonlymatchfilenameF)Zguessfilenameonly) �configZ configboolZ changectxZmatchfileset�repo�root�pathr � pygmentize) �webZfield�fctx�tmpl�style�exprZfilenameonly�ctx�m� r �>/usr/lib64/python3.9/site-packages/hgext/highlight/__init__.pyr 1 s �r c C s. |j jd }d|v r$t|d||j� | ||�S )N� Content-Type� htmls fileline)�res�headersr r )�origr r �mtr r r �filerevision_highlight>