https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/pygments/formatters/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/pygments/formatters/__pycache__/bbcode.cpython-310.pyc
o

���a��@s6dZddlmZddlmZdgZGdd�de�ZdS)z�
    pygments.formatters.bbcode
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    BBcode formatter.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�	Formatter)�get_bool_opt�BBCodeFormatterc@s8eZdZdZdZddgZgZdd�Zdd�Zd	d
�Z	dS)ra�
    Format tokens with BBcodes. These formatting codes are used by many
    bulletin boards, so you can highlight your sourcecode with pygments before
    posting it there.

    This formatter has no support for background colors and borders, as there
    are no common BBcode tags for that.

    Some board systems (e.g. phpBB) don't support colors in their [code] tag,
    so you can't use the highlighting together with that tag.
    Text in a [code] tag usually is shown with a monospace font (which this
    formatter can do with the ``monofont`` option) and no spaces (which you
    need for indentation) are removed.

    Additional options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `codetag`
        If set to true, put the output into ``[code]`` tags (default:
        ``false``)

    `monofont`
        If set to true, add a tag to show the code with a monospace font
        (default: ``false``).
    �BBCode�bbcode�bbcKs@tj|fi|��t|dd�|_t|dd�|_i|_|��dS)N�codetagF�monofont)r�__init__r�_code�_mono�styles�_make_styles)�self�options�r�</usr/lib/python3/dist-packages/pygments/formatters/bbcode.pyr
3s
zBBCodeFormatter.__init__cCs�|jD]C\}}d}}|dr|d|d7}d|}|dr'|d7}d|}|dr3|d	7}d
|}|dr?|d7}d
|}||f|j|<qdS)N��colorz[color=#%s]z[/color]�boldz[b]z[/b]�italicz[i]z[/i]�	underlinez[u]z[/u])�styler
)r�ttype�ndef�start�endrrrr;s �zBBCodeFormatter._make_stylesc	Cs�|jr|�d�|jr|�d�d}d}|D]2\}}||jvr'|j}||jvs||kr0||7}q|rD|j|\}}|�d�|||f��|}|}q|r]|j|\}}|�d�|||f��|jre|�d�|jrm|�d�|jss|jrz|�d�dSdS)Nz[code]z[font=monospace]rz[/font]z[/code]�
)r�writerr
�parent�join)	r�tokensource�outfile�lastval�lasttyper�valuerrrrr�format_unencodedNs6



�


�z BBCodeFormatter.format_unencodedN)
�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesr
rr&rrrrrsN)r*�pygments.formatterr�
pygments.utilr�__all__rrrrr�<module>s


https://t.me/RX1948 - 2025