$29 GRAYBYTE WORDPRESS FILE MANAGER $67

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms/

HOME
Current File : /opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms//components.py
# $Id: components.py 9037 2022-03-05 23:31:10Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.

"""
Docutils component-related transforms.
"""

from docutils.transforms import Transform

__docformat__ = 'reStructuredText'


class Filter(Transform):

    """
    Include or exclude elements which depend on a specific Docutils component.

    For use with `nodes.pending` elements.  A "pending" element's dictionary
    attribute ``details`` must contain the keys "component" and "format".  The
    value of ``details['component']`` must match the type name of the
    component the elements depend on (e.g. "writer").  The value of
    ``details['format']`` is the name of a specific format or context of that
    component (e.g. "html").  If the matching Docutils component supports that
    format or context, the "pending" element is replaced by the contents of
    ``details['nodes']`` (a list of nodes); otherwise, the "pending" element
    is removed.

    For example, up to version 0.17, the reStructuredText "meta"
    directive created a "pending" element containing a "meta" element
    (in ``pending.details['nodes']``).
    Only writers (``pending.details['component'] == 'writer'``)
    supporting the "html", "latex", or "odf" formats
    (``pending.details['format'] == 'html,latex,odf'``) included the
    "meta" element; it was deleted from the output of all other writers.

    This transform is no longer used by Docutils, it may be removed in future.
    """
    # TODO: clean up or keep this for 3rd party (or possible future) use?
    # (GM 2021-05-18)

    default_priority = 780

    def apply(self):
        pending = self.startnode
        component_type = pending.details['component']  # 'reader' or 'writer'
        formats = (pending.details['format']).split(',')
        component = self.document.transformer.components[component_type]
        for format in formats:
            if component.supports(format):
                pending.replace_self(pending.details['nodes'])
                break
        else:
            pending.parent.remove(pending)

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
5 Aug 2025 4.30 AM
root / root
0755
__pycache__
--
5 Aug 2025 4.30 AM
root / root
0755
__init__.py
6.709 KB
4 Jul 2025 8.31 PM
root / root
0644
components.py
2.101 KB
4 Jul 2025 8.31 PM
root / root
0644
frontmatter.py
20.87 KB
4 Jul 2025 8.31 PM
root / root
0644
misc.py
4.759 KB
4 Jul 2025 8.31 PM
root / root
0644
parts.py
6.75 KB
4 Jul 2025 8.31 PM
root / root
0644
peps.py
10.851 KB
4 Jul 2025 8.31 PM
root / root
0644
references.py
35.956 KB
4 Jul 2025 8.31 PM
root / root
0644
universal.py
12.254 KB
4 Jul 2025 8.31 PM
root / root
0644
writer_aux.py
2.985 KB
4 Jul 2025 8.31 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF