class RFC2822Body(Body): (source)
Known subclasses: docutils.parsers.rst.states.RFC2822List
Constructor: RFC2822Body(state_machine, debug)
RFC2822 headers are only valid as the first constructs in documents. As
soon as anything else appears, the Body
state should take over.
Method | rfc2822 |
RFC2822-style field list item. |
Method | rfc2822 |
Undocumented |
Class Variable | initial |
A list of transitions to initialize when a State is instantiated. Each entry is either a transition name string, or a (transition name, next state name) pair. See make_transitions() . Override in subclasses. |
Instance Variable | patterns |
{Name: pattern} mapping, used by make_transition() . Each pattern may be a string or a compiled re pattern. Override in subclasses. |
Inherited from Body
:
Method | add |
Undocumented |
Method | anonymous |
Anonymous hyperlink targets. |
Method | anonymous |
Undocumented |
Method | block |
Undocumented |
Method | build |
Undocumented |
Method | build |
Undocumented |
Method | bullet |
Bullet list item. |
Method | check |
Check attribution shape. Return the index past the end of the attribution, and the indent. |
Method | citation |
Undocumented |
Method | comment |
Undocumented |
Method | directive |
Returns a 2-tuple: list of nodes, and a "blank finish" boolean. |
Method | disallowed |
Undocumented |
Method | doctest |
Undocumented |
Method | enumerator |
Enumerated List Item |
Method | explicit |
Determine which explicit construct this is, parse & return it. |
Method | explicit |
Create a nested state machine for a series of explicit markup constructs (including anonymous hyperlink targets). |
Method | explicit |
Footnotes, hyperlink targets, directives, comments. |
Method | field |
Undocumented |
Method | field |
Field list item. |
Method | footnote |
Undocumented |
Method | grid |
Top border of a full table. |
Method | hyperlink |
Undocumented |
Method | indent |
Block quote. |
Method | is |
Check validity based on the ordinal value and the second line. |
Method | is |
Undocumented |
Method | isolate |
Undocumented |
Method | isolate |
Undocumented |
Method | line |
Section title overline or transition marker. |
Method | line |
First line of a line block. |
Method | line |
Return one line element of a line_block. |
Method | list |
Undocumented |
Method | make |
Construct and return the next enumerated list item marker, and an auto-enumerator ("#" instead of the regular enumerator). |
Method | make |
Undocumented |
Method | malformed |
Undocumented |
Method | nest |
Undocumented |
Method | nest |
Undocumented |
Method | option |
Undocumented |
Method | option |
Option list item. |
Method | parse |
Undocumented |
Method | parse |
Undocumented |
Method | parse |
Undocumented |
Method | parse |
Undocumented |
Method | parse |
Analyze an enumerator and return the results. |
Method | parse |
Parse datalines for a field list containing extension options matching option_spec . |
Method | parse |
Undocumented |
Method | parse |
Extract & return field name from a field marker match. |
Method | parse |
Return a list of node.option and node.option_argument objects, parsed from an option marker match. |
Method | parse |
Determine the type of reference of a target. |
Method | run |
Parse a directive then run its directive function. |
Method | simple |
Top border of a simple table. |
Method | split |
Check for a block quote attribution and split it off: |
Method | substitution |
Undocumented |
Method | table |
Parse a table. |
Method | table |
Top border of a generic table. |
Method | text |
Titles, definition lists, paragraphs. |
Method | unknown |
Undocumented |
Class Variable | attribution |
Undocumented |
Class Variable | enum |
Enumerated list parsing information. |
Class Variable | explicit |
Patterns and constants used for explicit markup recognition. |
Class Variable | grid |
Matches the top (& bottom) of a full table). |
Class Variable | pats |
Fragments of patterns used by transitions. |
Class Variable | simple |
Matches the bottom & header bottom of a simple table. |
Class Variable | simple |
Matches the top of a simple table. |
Inherited from RSTState
(via Body
):
Method | __init__ |
Initialize a StateSM object; extends State.__init__() . |
Method | bof |
Called at beginning of file. |
Method | check |
Check for a valid subsection header. Return 1 (true) or None (false). |
Method | goto |
Jump to input line abs_line_offset , ignoring jumps past the end. |
Method | inline |
Return 2 lists: nodes (text and inline elements), and system_messages. |
Method | nested |
Create a new StateMachine rooted at node and run it over the input block . Also keep track of optional intermediate blank lines and the required final one. |
Method | nested |
Create a new StateMachine rooted at node and run it over the input block . |
Method | new |
Append new subsection to document tree. On return, check level. |
Method | no |
Override StateWS.no_match to generate a system message. |
Method | paragraph |
Return a list (paragraph & messages) & a boolean: literal_block next? |
Method | runtime |
Initialize this State before running the state machine; called from self.state_machine.run() . |
Method | section |
Check for a valid subsection and create one if it checks out. |
Method | title |
Undocumented |
Method | unindent |
Undocumented |
Class Variable | nested |
Undocumented |
Instance Variable | document |
Undocumented |
Instance Variable | inliner |
Undocumented |
Instance Variable | memo |
Undocumented |
Instance Variable | nested |
Keyword arguments dictionary, passed to the nested_sm constructor. |
Instance Variable | parent |
Undocumented |
Instance Variable | reporter |
Undocumented |
Inherited from StateWS
(via Body
, RSTState
):
Method | add |
Add whitespace-specific transitions before those defined in subclass. |
Method | blank |
Handle blank lines. Does nothing. Override in subclasses. |
Method | first |
Handle an indented text block (first line's indent known). |
Method | known |
Handle a known-indent text block. Extend or override in subclasses. |
Class Variable | ws |
Default initial whitespace transitions, added before those listed in State.initial_transitions . May be overridden in subclasses. |
Class Variable | ws |
Patterns for default whitespace transitions. May be overridden in subclasses. |
Instance Variable | indent |
The StateMachine class handling indented text blocks. |
Instance Variable | indent |
Keyword arguments dictionary, passed to the indent_sm constructor. |
Instance Variable | known |
The StateMachine class handling known-indented text blocks. |
Instance Variable | known |
Keyword arguments dictionary, passed to the known_indent_sm constructor. |
Inherited from State
(via Body
, RSTState
, StateWS
):
Method | add |
Add a transition to the start of the transition list. |
Method | add |
Add a list of transitions to the start of the transition list. |
Method | eof |
Handle end-of-file. Return empty result. |
Method | make |
Make & return a transition tuple based on name . |
Method | make |
Return a list of transition names and a transition mapping. |
Method | nop |
A "do nothing" transition method. |
Method | remove |
Remove a transition by name . |
Method | unlink |
Remove circular references to objects no longer required. |
Instance Variable | debug |
Debugging mode on/off. |
Instance Variable | nested |
The StateMachine class for handling nested processing. |
Instance Variable | state |
A reference to the controlling StateMachine object. |
Instance Variable | transition |
A list of transition names in search order. |
Instance Variable | transitions |
A mapping of transition names to 3-tuples containing (compiled_pattern, transition_method, next_state_name). Initialized as an instance attribute dynamically (instead of as a class attribute) because it may make forward references to patterns and methods in this or other classes. |
A list of transitions to initialize when a State
is instantiated.
Each entry is either a transition name string, or a (transition name, next
state name) pair. See make_transitions()
. Override in subclasses.
{Name: pattern} mapping, used by make_transition()
. Each pattern may
be a string or a compiled re
pattern. Override in subclasses.