+
     h  c                   sb    R t ^ RItR.t]P                  ! R]P                  4      tR tRR ltR# )z
pygments.modeline
~~~~~~~~~~~~~~~~~

A simple modeline parser (based on pymodeline).

:copyright: Copyright 2006-2025 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                 sb    \         P                  V 4      pV'       d   VP                  ^4      # R# )i   N)modeline_reZsearchZgroup)ZlZms   & B/usr/lib/python3.14/site-packages/pip/_vendor/pygments/modeline.pyget_filetype_from_liner      s(    1Awwqz 	    c                s   V P                  4       pVRV) ^,
          R1,           F  p\        V4      pV'       g   K  Vu # 	  \        VRR4       F2  pV\        V4      8  g   K  \        W%,          4      pV'       g   K0  Vu # 	  R# )zD
Scan the buffer for modelines and return filetype if one is found.
Ni)Z
splitlinesr   ZrangeZlen)ZbufZ	max_linesZlinesZlineZretZis   &&    r   r    r       s~     NNEb)Ab())$T*3J * 9b"%s5z>(2Cs
	 & r   )i   )Z__doc__ZreZ__all__ZcompileZVERBOSEr   r   r    ) r   r   <module>r      s?    
%
& jj  ZZr   