khoulihan/gopher-render

Allow renderer override settings to be specified alongside renderers in the parser

Closed this issue · 0 comments

In the dictionary where the renderers are specified, it should be possible to specify settings for the renderer to override the defaults.

In combination with the other proposed change to use CSS selectors, this would allow the same Renderer to be used for multiple purposes but with minor changes, avoiding the need for overrides for every situation.

For example:

{
    "p": ParagraphRenderer,
    "li p": (ParagraphRenderer, {
        "margin": [0,0,0,0],
        "initial_indent": 0,
    }),
}