docutils.transforms.writer_aux module

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
class Compound(document, startnode=None)[source]

Bases: 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

Numerical priority of this transform, 0 through 999 (override).

apply()[source]

Override to apply the transform to the document tree.

class Admonitions(document, startnode=None)[source]

Bases: 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

Numerical priority of this transform, 0 through 999 (override).

apply()[source]

Override to apply the transform to the document tree.