Skip to content

Make HTML stringification/indentation a separate phase #7

@thoward

Description

@thoward

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions