
    k"g                     ^    d Z ddlZdgZ ej                  dej                        Zd ZddZy)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.
    Nget_filetype_from_bufferze
    (?: vi | vim | ex ) (?: [<=>]? \d* )? :
    .* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ )
c                 T    t         j                  |       }|r|j                  d      S y )N   )modeline_researchgroup)lms     V/var/www/html/djangosite/lib/python3.12/site-packages/pip/_vendor/pygments/modeline.pyget_filetype_from_liner      s(    1Awwqz 	    c                     | j                         }|d| dz
  d   D ]  }t        |      }|s|c S  t        |dd      D ]%  }|t        |      k  st        ||         }|s#|c S  y)zL
    Scan the buffer for modelines and return filetype if one is found.
    r   N)
splitlinesr   rangelen)buf	max_lineslinesr	   retis         r   r   r      s     NNE2yjl2%& $Q'J 9b"% s5z>(q2C
	 r   )   )__doc__re__all__compileVERBOSEr   r   r    r   r   <module>r      sA    
%
& bjj  ZZr   