GRAYBYTE WORDPRESS FILE MANAGER4122

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/imunify360/venv/lib/python3.11/site-packages/docutils/transforms/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms//writer_aux.py
# $Id: writer_aux.py 9037 2022-03-05 23:31:10Z milde $
# Author: Lea Wiemann <LeWiemann@gmail.com>
# Copyright: This module has been placed in the public domain.

"""
Auxiliary transforms mainly to be used by Writer components.

This module is called "writer_aux" because otherwise there would be
conflicting imports like this one::

    from docutils import writers
    from docutils.transforms import writers
"""

__docformat__ = 'reStructuredText'

import warnings

from docutils import nodes, languages
from docutils.transforms import Transform


class Compound(Transform):

    """
    .. warning:: This transform is not used by Docutils since Dec 2010
                 and will be removed in Docutils 0.21 or later.

    Flatten all compound paragraphs.  For example, transform ::

        <compound>
            <paragraph>
            <literal_block>
            <paragraph>

    into ::

        <paragraph>
        <literal_block classes="continued">
        <paragraph classes="continued">
    """

    default_priority = 910

    def __init__(self, document, startnode=None):
        warnings.warn('docutils.transforms.writer_aux.Compound is deprecated'
                      ' and will be removed in Docutils 0.21 or later.',
                      DeprecationWarning, stacklevel=2)
        super().__init__(document, startnode)

    def apply(self):
        for compound in self.document.findall(nodes.compound):
            first_child = True
            for child in compound:
                if first_child:
                    if not isinstance(child, nodes.Invisible):
                        first_child = False
                else:
                    child['classes'].append('continued')
            # Substitute children for compound.
            compound.replace_self(compound[:])


class Admonitions(Transform):

    """
    Transform specific admonitions, like this:

        <note>
            <paragraph>
                 Note contents ...

    into generic admonitions, like this::

        <admonition classes="note">
            <title>
                Note
            <paragraph>
                Note contents ...

    The admonition title is localized.
    """

    default_priority = 920

    def apply(self):
        language = languages.get_language(self.document.settings.language_code,
                                          self.document.reporter)
        for node in self.document.findall(nodes.Admonition):
            node_name = node.__class__.__name__
            # Set class, so that we know what node this admonition came from.
            node['classes'].append(node_name)
            if not isinstance(node, nodes.admonition):
                # Specific admonition.  Transform into a generic admonition.
                admonition = nodes.admonition(node.rawsource, *node.children,
                                              **node.attributes)
                title = nodes.title('', language.labels[node_name])
                admonition.insert(0, title)
                node.replace_self(admonition)

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 02 2025 08:36:55
root / root
0755
__pycache__
--
July 02 2025 08:36:55
root / root
0755
__init__.py
6.709 KB
June 09 2025 11:12:39
root / root
0644
components.py
2.101 KB
June 09 2025 11:12:39
root / root
0644
frontmatter.py
20.87 KB
June 09 2025 11:12:39
root / root
0644
misc.py
4.759 KB
June 09 2025 11:12:39
root / root
0644
parts.py
6.75 KB
June 09 2025 11:12:39
root / root
0644
peps.py
10.851 KB
June 09 2025 11:12:39
root / root
0644
references.py
35.956 KB
June 09 2025 11:12:39
root / root
0644
universal.py
12.254 KB
June 09 2025 11:12:39
root / root
0644
writer_aux.py
2.985 KB
June 09 2025 11:12:39
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF