|e^dZddlZdgZejdejZdZddZy)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]+ ) cTtj|}|r|jdSy)N) modeline_researchgroup)lms 3/usr/lib/python3/dist-packages/pygments/modeline.pyget_filetype_from_liner s(1Awwqz c|j}|d| dz dD]}t|}|s|cSt|ddD]%}|t|kst||}|s#|cSy)zL Scan the buffer for modelines and return filetype if one is found. rN) splitlinesr rangelen)buf max_lineslinesr retis r rrs NN E 2yjl2% &$Q' J9b" % s5z>(q2C  r ))__doc__re__all__compileVERBOSErr rr r rsA % &bjjZZ  r