YBFj dZddlZddlmZmZmZddlmZmZm Z m Z m Z m Z m Z mZgdZGddeZGdd eZGd d eZdS) z pygments.lexers.diff ~~~~~~~~~~~~~~~~~~~~ Lexers for diff/patch formats. :copyright: Copyright 2006-present by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) RegexLexerincludebygroups)TextCommentOperatorKeywordNameGenericLiteral Whitespace) DiffLexerDarcsPatchLexer WDiffLexerc ReZdZdZdZddgZddgZddgZd Zd Z d d e e e e fd e e je fde e je fde e je fde e je fde e je fde e je fde e e fgiZdZdS)rz> Lexer for unified or context-style diffs or patches. Diffdiffudiffz*.diffz*.patchz text/x-diffz text/x-patchz"https://en.wikipedia.org/wiki/Diffrootz ( )(.*)(\n)z (!.*|---)(\n)z((?:< |-).*)(\n)z((?:> |\+).*)(\n)z*(@.*|\d(?:,\d+)?(?:a|c|d)\d+(?:,\d+)?)(\n)z((?:[Ii]ndex|diff).*)(\n)z (=.*)(\n)(.*)(\n)cf|dddkrdS|dddkrdS|dddkrdSdS) NzIndex: Tzdiff z--- g?)texts BC:\PYTHON\_runtimes\venv\Lib\site-packages\pygments/lexers/diff.py analyse_textzDiffLexer.analyse_text0sR 8y 4 8w  4 8v  3  N)__name__ __module__ __qualname____doc__namealiases filenames mimetypesurl version_addedrr rr StrongDeletedInserted SubheadingHeadingtokensrrr rrrs" DwG9%I/I .CM  XXj$ CC D xx CC D ((7?J"G"G H !88G,z\{z\}z/(\[)((?:TAG )?)(.*)(\n)(.*)(\*\*)(\d+)(\s?)(\])z+(\[)((?:TAG )?)(.*)(\n)(.*)(\*\*)(\d+)(\s?)commentz New patches:zContext:zPatch bundle hash:z(\s*)({})(.*)(\n)|z\+insert-deleterz [^\]].*\nz\]#popz\nz \[_[^_]*_] specialTextz\[z[^\n\[]+)rr<rBr>r@N)r!r"r#r$r%r&r'r)r*DPATCH_KEYWORDSrrr r r r Dater r/formatjoinrr-r,rrr0rr rrr9s DjG^,I CM"O 8  8  H  H  ? Xhz4lJ:: ;< Xhz4lJ001: <go . '/ * "GO 4 ! ( (/)B)B C CWdJ?? A G$h / 7?H - ((444 5% *7 # Hf % J ' H % GM " " G$ % '* + GM " " GO $ '/ * E''FFFr rc leZdZdZdZdZdgZdgZgZdZ e j e j zZ dZdZd Zd Zd Zeejd feejd feefdefgeejdfeejdfeejdfeejdfeejfdejfgeejdfeejdfeejdfeejdfeejfdejfgdZdS)rz 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*.wdiffz2.2z\{\+z\+\}z\[\-z\-\]z [^{}[\]+-]+inserteddeleted.z#pushrA)rrJrKN)r!r"r#r$r%r)r&r'r(r*re MULTILINEDOTALLflagsins_opins_cldel_opdel_clnormalr r-r,rr0rr rrrss; D /CiG IIM L29 $E F F F F FW%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? # !FFFr r)r$rMpygments.lexerrrrpygments.tokenrrrr r r r r __all__rrrrr rrYs3 8888888888 9 8 8""""" """J77777j777t6666666666r