Currently indents are calculated as we go, and the entire output is returned as a single string.
It makes sense to separate this into a couple distinct phases:
- Convert parsed RST AST into a HTML Tag tree
- Apply CSS to HTML Tag tree (or any other modifications)
- Convert HTML Tag tree to a single string of output, with configurable indents amount
Expose access to renderer at all phases. Allow consumers of library to, for example, get a iterable tree of output tags, instead of a string.
Each node should include a copy of the parser's AST node it was generated from, as a reference.