+
    TBi                         R t ^ RIt^ RIHtHtHt ^ RIHtHtH	t	H
t
HtHtHtHt . R
Ot ! R R]4      t ! R R]4      t ! R	 R]4      tR# )z
pygments.lexers.diff
~~~~~~~~~~~~~~~~~~~~

Lexers for diff/patch formats.

:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
N)
RegexLexerincludebygroups)TextCommentOperatorKeywordNameGenericLiteral
Whitespace	DiffLexerDarcsPatchLexer
WDiffLexerc                   p  a  ] tR t^t o RtRtRR.tRR.tRR.tR	t	R
t
RR]! ]]]4      3R]! ]P                  ]4      3R]! ]P                   ]4      3R]! ]P"                  ]4      3R]! ]P$                  ]4      3R]! ]P&                  ]4      3R]! ]P&                  ]4      3R]! ]]4      3./tR tRtV tR# )r   z6
Lexer for unified or context-style diffs or patches.
Diffdiffudiffz*.diffz*.patchztext/x-diffztext/x-patchz"https://en.wikipedia.org/wiki/Diff rootz( )(.*)(\n)z(!.*|---)(\n)z((?:< |-).*)(\n)z((?:> |\+).*)(\n)z*(@.*|\d(?:,\d+)?(?:a|c|d)\d+(?:,\d+)?)(\n)z((?:[Ii]ndex|diff).*)(\n)z	(=.*)(\n)(.*)(\n)c                f    V R ,          R8X  d   R# V R,          R8X  d   R# V R,          R8X  d   R# R# )	:N   NzIndex: T:N   Nzdiff :N   Nz--- g?N )texts   &9/usr/lib/python3.14/site-packages/pygments/lexers/diff.pyanalyse_textDiffLexer.analyse_text0   s4    8y 8w8v     r   N)__name__
__module____qualname____firstlineno____doc__namealiases	filenames	mimetypesurlversion_addedr   r   r   r
   StrongDeletedInserted
SubheadingHeadingtokensr   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s      DwG9%I/I
.CM 	Xj$
CDx
CD (7??J"GH!8G,<,<j#IJ=++Z8 *8GOOZ+PQ8GOOZ@A(445
F  r    c                   b   ] tR t^9tRtRtR.tRR.tRtRt	R$t
RR	]3R
]3R]3R]3R]! ]]]]]]]P"                  ]]4	      3R]! ]]]]]]]P"                  ]4      R3R]P&                  3R]P&                  3R]P&                  3RP)                  RP+                  ]
4      4      ]! ]]]]4      3R]P.                  R3R]P0                  R3R]! ]]4      3.RR]3R]R3.RR]R3R]3.R]! R4      R ]P.                  3R!]P.                  3.R]! R4      R ]P0                  3R!]P0                  3./tR"tR## )%r   z
DarcsPatchLexer is a lexer for the various versions of the darcs patch
format.  Examples of this format are derived by commands such as
``darcs annotate --patch`` and ``darcs send``.
zDarcs Patchdpatchz*.dpatchz*.darcspatchzhttps://darcs.netz0.10r   <>z\{z\}z/(\[)((?:TAG )?)(.*)(\n)(.*)(\*\*)(\d+)(\s?)(\])z+(\[)((?:TAG )?)(.*)(\n)(.*)(\*\*)(\d+)(\s?)commentzNew patches:zContext:zPatch bundle hash:z(\s*)({})(.*)(\n)|z\+insert-deleter   z	[^\]].*\nz\]#popspecialTextz\nz
\[_[^_]*_]z\[z[^\n\[]+r   N)hunkaddfileadddirrmfilermdirmovereplace)r!   r"   r#   r$   r%   r&   r'   r(   r*   r+   DPATCH_KEYWORDSr   r   r   r	   r   r   Dater
   r0   formatjoinr   r.   r-   r   r   r1   r2   r   r    r   r   r   9   s    DjG^,I
CM"O 	88HH?hz4llJ:; <hz4llJ01:< goo.'//*"GOO4!((/)BCWdJ?AG$$h/7??H-(445%
( 	7#Hf%
 	J'H%
 	M"G$$%'**+

 	M"GOO$'//*
E'Fr    c                       ] tR t^stRtRtRtR.tR.t. t	Rt
]P                  ]P                  ,          tRtRtR	tR
tRtR]]P*                  R3]]P,                  R3]]3R]3.R]]P*                  R3]]P*                  R3]]P*                  R3]]P*                  R3]]P*                  3R]P*                  3.R]]P,                  R3]]P,                  R3]]P,                  R3]]P,                  R3]]P,                  3R]P,                  3./tRtR# )r   z
A wdiff lexer.

Note that:

* It only works with normal output (without options like ``-l``).
* If the target files contain "[-", "-]", "{+", or "+}",
  especially they are unbalanced, the lexer will get confused.
WDiffz#https://www.gnu.org/software/wdiff/wdiffz*.wdiffz2.2z\{\+z\+\}z\[\-z\-\]z[^{}[\]+-]+r   inserteddeleted.z#pushr>   r   N)r!   r"   r#   r$   r%   r&   r*   r'   r(   r)   r+   re	MULTILINEDOTALLflagsins_opins_cldel_opdel_clnormalr
   r.   r-   r   r1   r2   r   r    r   r   r   s   sS    D
/CiGIIMLL299$E FFFFFW%%z2W__i0TN4L	
 	W%%w/W%%w/W%%v.W%%v.W%%&7##$
 	W__g.W__g.W__f-W__f-W__%7??#
!Fr    )r   r   r   )r%   rQ   pygments.lexerr   r   r   pygments.tokenr   r   r   r   r	   r
   r   r   __all__r   r   r   r   r    r   <module>r]      sQ    
 8 8   9"
 "J7j 7t6 6r    