Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/pygments/__pycache__/ |
Upload File : |
o ���a� � @ s6 d Z ddlZdgZe�dej�Zdd� Zd dd�ZdS ) z� pygments.modeline ~~~~~~~~~~~~~~~~~ A simple modeline parser (based on pymodeline). :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N�get_filetype_from_bufferze (?: vi | vim | ex ) (?: [<=>]? \d* )? : .* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ ) c C s t �| �}|r|�d�S d S )N� )�modeline_re�search�group)�l�m� r �3/usr/lib/python3/dist-packages/pygments/modeline.py�get_filetype_from_line s �r � c C sp | � � }|d| d d� D ]}t|�}|r| S qt|dd�D ]}|t|�k r5t|| �}|r5| S q!dS )zL Scan the buffer for modelines and return filetype if one is found. ���r N)� splitlinesr �range�len)�buf� max_lines�linesr �ret�ir r r r s ��)r )�__doc__�re�__all__�compile�VERBOSEr r r r r r r �<module> s �