U
Ê—ReÚ ã @ s6 d Z ddlZdgZe dej¡Zdd„ Zd dd„ZdS )
zÖ
pygments.modeline
~~~~~~~~~~~~~~~~~
A simple modeline parser (based on pymodeline).
:copyright: Copyright 2006-2022 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 úŒ/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/pygments/modeline.pyÚget_filetype_from_line s
r é c C sp | ¡ }|d| d d… D ]}t|ƒ}|r| S qt|ddƒD ](}|t|ƒk rBt|| ƒ}|rB| S qBdS )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
Ú