class BlockParser: (source)
Parse Markdown blocks into an ElementTree object. A wrapper class that stitches the various BlockProcessors together, looping through them and creating an ElementTree object.
Method | __init__ |
Undocumented |
Method | parse |
Process blocks of markdown text and attach to given etree node. |
Method | parse |
Parse a chunk of markdown text and attach to given etree node. |
Method | parse |
Parse a markdown document into an ElementTree. |
Instance Variable | blockprocessors |
Undocumented |
Instance Variable | md |
Undocumented |
Instance Variable | root |
Undocumented |
Instance Variable | state |
Undocumented |
Process blocks of markdown text and attach to given etree node. Given a list of ``blocks``, each blockprocessor is stepped through until there are no blocks left. While an extension could potentially call this method directly, it's generally expected to be used internally. This is a public method as an extension may need to add/alter additional BlockProcessors which call this method to recursively parse a nested block.
Parse a chunk of markdown text and attach to given etree node. While the ``text`` argument is generally assumed to contain multiple blocks which will be split on blank lines, it could contain only one block. Generally, this method would be called by extensions when block parsing is required. The ``parent`` etree Element passed in is altered in place. Nothing is returned.