GRAYBYTE WORDPRESS FILE MANAGER1560

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/pip/_vendor/pygments/formatters/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/pip/_vendor/pygments/formatters//pangomarkup.py
"""
    pygments.formatters.pangomarkup
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for Pango markup output.

    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pip._vendor.pygments.formatter import Formatter


__all__ = ['PangoMarkupFormatter']


_escape_table = {
    ord('&'): '&',
    ord('<'): '&lt;',
}


def escape_special_chars(text, table=_escape_table):
    """Escape & and < for Pango Markup."""
    return text.translate(table)


class PangoMarkupFormatter(Formatter):
    """
    Format tokens as Pango Markup code. It can then be rendered to an SVG.

    .. versionadded:: 2.9
    """

    name = 'Pango Markup'
    aliases = ['pango', 'pangomarkup']
    filenames = []

    def __init__(self, **options):
        Formatter.__init__(self, **options)

        self.styles = {}

        for token, style in self.style:
            start = ''
            end = ''
            if style['color']:
                start += '<span fgcolor="#{}">'.format(style['color'])
                end = '</span>' + end
            if style['bold']:
                start += '<b>'
                end = '</b>' + end
            if style['italic']:
                start += '<i>'
                end = '</i>' + end
            if style['underline']:
                start += '<u>'
                end = '</u>' + end
            self.styles[token] = (start, end)

    def format_unencoded(self, tokensource, outfile):
        lastval = ''
        lasttype = None

        outfile.write('<tt>')

        for ttype, value in tokensource:
            while ttype not in self.styles:
                ttype = ttype.parent
            if ttype == lasttype:
                lastval += escape_special_chars(value)
            else:
                if lastval:
                    stylebegin, styleend = self.styles[lasttype]
                    outfile.write(stylebegin + lastval + styleend)
                lastval = escape_special_chars(value)
                lasttype = ttype

        if lastval:
            stylebegin, styleend = self.styles[lasttype]
            outfile.write(stylebegin + lastval + styleend)

        outfile.write('</tt>')

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 15 2025 08:30:34
root / root
0755
__pycache__
--
May 15 2025 08:30:34
root / root
0755
__init__.py
5.259 KB
April 17 2025 13:10:58
root / root
0644
_mapping.py
4.078 KB
April 17 2025 13:10:58
root / root
0644
bbcode.py
3.242 KB
April 17 2025 13:10:58
root / root
0644
groff.py
4.986 KB
April 17 2025 13:10:58
root / root
0644
html.py
34.833 KB
April 17 2025 13:10:58
root / root
0644
img.py
22.741 KB
April 17 2025 13:10:58
root / root
0644
irc.py
4.864 KB
April 17 2025 13:10:58
root / root
0644
latex.py
18.854 KB
April 17 2025 13:10:58
root / root
0644
other.py
4.916 KB
April 17 2025 13:10:58
root / root
0644
pangomarkup.py
2.166 KB
April 17 2025 13:10:58
root / root
0644
rtf.py
11.677 KB
April 17 2025 13:10:58
root / root
0644
svg.py
7.006 KB
April 17 2025 13:10:58
root / root
0644
terminal.py
4.564 KB
April 17 2025 13:10:58
root / root
0644
terminal256.py
11.478 KB
April 17 2025 13:10:58
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF