|eQdZddlmZddlmZmZmZmZmZm Z m Z m Z m Z m Z ddlmZdgZie de dedej"ded ej$de j&d ej(dej*d ej,d ej.d ej0dej2dej4dej6dej8dej:dede d e j<de j>d e j@de jBde jdediZ"idddddddddddd d!d"d#d$d%d$d&d'd(d)d*d)d+d,d-d.d/d.d0d1d2d3d4d5dZ#d6Z$Gd7deZ%y8)9z pygments.formatters.irc ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for IRC output :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. ) Formatter) KeywordNameCommentStringErrorNumberOperatorGenericToken Whitespace)get_choice_opt IRCFormatter)r)gray brightblack)cyan brightcyan)blue brightblue)magentar)green brightgreen)_cyan_ _brightcyan_)_green_ _brightgreen_)rr)red brightred)rr)yellowr )rr)**r!)z *magenta*z*brightmagenta*) _brightred_r"whiteblackrrrr roranger brightyellow lightgreen rr lightblue rr brightmagenta c*t|dkr|Sdx}}d|vr|dz }d|z}|jd}d|vr|dz }d|z}|jd}t|dkDr,|dtt|j d zz }d|z}||z|zS) Nr%r_*rr&)lenstripstr IRC_COLOR_MAPzfill)colortextaddsubs 9/usr/lib/python3/dist-packages/pygments/formatters/irc.py ircformatrILs 5zA~ NC# e| v sl C  e| v sl C  5zA~ vM%0177:::sl : c2eZdZdZdZddgZgZdZdZdZ y)raS Format tokens with IRC color sequences The `get_style_defs()` method doesn't do anything special since there is no support for common styles. Options accepted: `bg` Set to ``"light"`` or ``"dark"`` depending on the terminal's background (default: ``"light"``). `colorscheme` A dictionary mapping token types to (lightbg, darkbg) color names or ``None`` (default: ``None`` = use builtin colorscheme). `linenos` Set to ``True`` to have line numbers in the output as well (default: ``False`` = no line numbers). IRCircc tj|fi|t|dddgddk(|_|j ddxst |_|j dd|_d|_y)Nbglightdark colorschemelinenosFr) r__init__rdarkbgget IRC_COLORSrRrS_lineno)selfoptionss rHrTzIRCFormatter.__init__zsj4+7+$Wd&-v%6ADJK ";;}d;Iz{{9e4  rJc|jr4|xjdz c_|jd|jzyy)Nr%z%04d: )rSrXwrite)rYoutfiles rH _write_linenozIRCFormatter._write_linenos1 << LLA L MM(T\\1 2 rJc|j||D]\}}|jj|}|#|dd}|jj|}|#|r||j}|j d}|ddD]A}|r|j t |||j d|j|C|ds|j t ||d|j |y)N )r^rRrVrUsplitr\rI)rY tokensourcer]ttypevaluerDspllines rHformat_unencodedzIRCFormatter.format_unencodeds 7#' %LE5$$((/E-cr ((,,U3-dkk*kk$'H0D it&<=MM$'&&w/ 0 r7MM)E3r7";< e$! %rJN) __name__ __module__ __qualname____doc__namealiases filenamesrTr^rhrJrHrras+( DenGI3 %rJN)&rlpygments.formatterrpygments.tokenrrrrrr r r r r pygments.utilr__all__PreprocTypeWordBuiltinFunction NamespaceClass Exception DecoratorVariableConstant AttributeTagDeletedInsertedHeading SubheadingrWrBrIrrprJrHrs~)111(    +1 1   OO5   1  LL5 MM6 LL5 MM2 NN7 JJ4 NN5 NN2 MM0  MM0!" NN5#$ HH;%& 2 1 OO9 1 OO, : MM9 ;9 @ Q Q A1     a q a QA!! B 2 "!"R#$ ' ,)*9%99%rJ