Your IP : 216.73.216.85


Current Path : /opt/alt/python37/lib/python3.7/site-packages/pygments/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/pygments/__pycache__/modeline.cpython-37.opt-1.pyc

B

ν�\��@s6dZddlZdgZe�dej�Zdd�Zd	dd�ZdS)
z�
    pygments.modeline
    ~~~~~~~~~~~~~~~~~

    A simple modeline parser (based on pymodeline).

    :copyright: Copyright 2006-2019 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]+ )
cCst�|�}|r|�d�SdS)N�)�modeline_re�search�group)�l�m�r	�B/opt/alt/python37/lib/python3.7/site-packages/pygments/modeline.py�get_filetype_from_lines
r�cCsp|��}x,|d|dd�D]}t|�}|r|SqWx4t|dd�D]$}|t|�krDt||�}|rD|SqDWdS)zL
    Scan the buffer for modelines and return filetype if one is found.
    ���rN)�
splitlinesr�range�len)ZbufZ	max_lines�linesrZret�ir	r	r
rs)r)�__doc__�re�__all__�compile�VERBOSErrrr	r	r	r
�<module>
s