class documentation

class FootnoteBlockProcessor(BlockProcessor): (source)

View In Hierarchy

Find all footnote references and store for later use.

Method __init__ Undocumented
Method detab Remove one level of indent from a block.
Method detectTabbed Find indented text and remove indent before further proccesing.
Method run Find, set, and remove footnote definitions.
Method test Test for block type. Must be overridden by subclasses.
Constant RE Undocumented
Instance Variable footnotes Undocumented

Inherited from BlockProcessor:

Method lastChild Return the last child of an etree element.
Method looseDetab Remove a tab from front of lines but allowing dedented lines.
Instance Variable parser Undocumented
Instance Variable tab_length Undocumented
def __init__(self, footnotes): (source)
def detab(self, block): (source)

Remove one level of indent from a block. Preserve lazily indented blocks by only removing indent from indented lines.

def detectTabbed(self, blocks): (source)

Find indented text and remove indent before further proccesing. Returns: a list of blocks with indentation removed.

def run(self, parent, blocks): (source)

Find, set, and remove footnote definitions.

def test(self, parent, block): (source)

Test for block type. Must be overridden by subclasses. As the parser loops through processors, it will call the ``test`` method on each to determine if the given block of text is of that type. This method must return a boolean ``True`` or ``False``. The actual method of testing is left to the needs of that particular block type. It could be as simple as ``block.startswith(some_string)`` or a complex regular expression. As the block type may be different depending on the parent of the block (i.e. inside a list), the parent etree element is also provided and may be used as part of the test. Keywords: * ``parent``: A etree element which will be the parent of the block. * ``block``: A block of text from the source which has been split at blank lines.

Undocumented

Value
re.compile(r'^ {,3}\[\^([^\]]*)\]: *(.*)$',
           re.MULTILINE)
footnotes = (source)

Undocumented