o ‡ÎÖaËã@s”dZddlmZddlmZmZmZmZmZm Z m Z m Z m Z m Z ddlmZdgZie d“e d“ed“ejd“ed “ejd“e jd “ejd“ejd “ejd “ejd “ejd“ejd“ejd“ejd“ejd“ejd“ede d e jde jd e j de j!de jdedi¥Z"idd“dd“dd“dd“dd“dd “d!d"“d#d$“d%d$“d&d'“d(d)“d*d)“d+d,“d-d.“d/d.“d0d1“d2d3“d4d5dœ¥Z#d6d7„Z$Gd8d„deƒZ%d9S):zË pygments.formatters.irc ~~~~~~~~~~~~~~~~~~~~~~~ Formatter for IRC output :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. é)Ú Formatter) ÚKeywordÚNameÚCommentÚStringÚErrorÚNumberÚOperatorÚGenericÚTokenÚ 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!ÚwhiteÚblackéréréréréréÚorangeérÚ brightyellowéÚ lightgreené rré Ú lightblueé rré Ú brightmagentaé éécCs–t|ƒdkr|Sd}}d|vr|d7}d|}| d¡}d|vr.|d7}d|}| d¡}t|ƒdkrE|dtt|ƒ d ¡7}d|}|||S) Nr$rÚ_úÚ*úrúr%)ÚlenÚstripÚstrÚ IRC_COLOR_MAPÚzfill)ÚcolorÚtextÚaddÚsub©rFú9/usr/lib/python3/dist-packages/pygments/formatters/irc.pyÚ ircformatLs     rHc@s@eZdZdZdZddgZgZdd„Zdd„Zdd „Z d d „Z d S) 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). ÚIRCÚirccKsTtj|fi|¤Žt|dddgdƒdk|_| dd¡pt|_| dd¡|_d|_dS)NÚbgÚlightÚdarkÚ colorschemeÚlinenosFr) rÚ__init__r ÚdarkbgÚgetÚ IRC_COLORSrNrOÚ_lineno)ÚselfÚoptionsrFrFrGrPzsÿÿ zIRCFormatter.__init__cCs"|jd7_| d|j¡dS)Nr$z %04d: )rTÚwrite)rUÚoutfilerFrFrGÚ _write_lineno‚szIRCFormatter._write_linenoc Csì| |¡|D]g\}}| d¡r| |¡|dd…}|j |¡}|dur2|j}|j |¡}|dus%|ri||j}| d¡}|dd…D]}| |¡|rY| t||dd…ƒ¡qD|drh| t||dƒ¡q| |¡q| d¡dS)NÚ éÿÿÿÿ) rYÚendswithrNrRÚparentrQÚsplitrWrH©rUÚ tokensourcerXÚttypeÚvaluerBÚsplÚlinerFrFrGÚ_format_unencoded_with_lineno†s.       þ   €€ z*IRCFormatter._format_unencoded_with_linenocCsÌ|jr | ||¡dS|D]V\}}|j |¡}|dur+|dd…}|j |¡}|dus|r^||j}| d¡}|dd…D]}|rI| t||ƒ¡| d¡q=|dr]| t||dƒ¡q | |¡q dS)Nr[rZ)rOrerNrRrQr^rWrHr_rFrFrGÚformat_unencodedŸs*     þ   € ñzIRCFormatter.format_unencodedN) Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚnameÚaliasesÚ filenamesrPrYrerfrFrFrFrGras N)&rjÚpygments.formatterrÚpygments.tokenrrrrrrr r r r Ú pygments.utilr Ú__all__ÚPreprocÚTypeÚWordÚBuiltinÚFunctionÚ NamespaceÚClassÚ ExceptionÚ DecoratorÚVariableÚConstantÚ AttributeÚTagÚDeletedÚInsertedÚHeadingÚ SubheadingrSr@rHrrFrFrFrGÚs² 0 ÿýüûúùø ÷ ö õ ô óòñðïîä ÿþýüûúùø ÷ ö õ ô óòñðïí