R`i ^ d Z ddlZdgZ ej dej Zd ZddZy)z
pygments.modeline
~~~~~~~~~~~~~~~~~
A simple modeline parser (based on pymodeline).
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
Nget_filetype_from_bufferze
(?: vi | vim | ex ) (?: [<=>]? \d* )? :
.* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ )
c T t j | }|r|j d S y )N )modeline_researchgroup)lms /builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/pygments/modeline.pyget_filetype_from_liner s( 1Awwqz c | j }|d| dz
d D ] }t | }|s|c S t |dd D ]% }|t | k st || }|s#|c S y)zL
Scan the buffer for modelines and return filetype if one is found.
r N)
splitlinesr rangelen)buf max_lineslinesr retis r r r sy
NNE
2yjl2%
&$Q'J ' 9b"
%s5z>(q2C
& r
) )__doc__re__all__compileVERBOSEr r r r
r