Closed straight-shoota closed 3 years ago
This patch extracts a couple of methods in HTMLRenderer which allow to easier hook in to change certain aspects of a render method, without having to override the entire method and duplicate all steps.
Use cases are for Crystal's API docs rendering: https://github.com/crystal-lang/crystal/blob/32659bc7c6be76111afc3dc00ef4ac5fcee5806d/src/compiler/crystal/tools/doc/markd_doc_renderer.cr (see https://github.com/crystal-lang/crystal/pull/11040).
This patch extracts a couple of methods in HTMLRenderer which allow to easier hook in to change certain aspects of a render method, without having to override the entire method and duplicate all steps.
Use cases are for Crystal's API docs rendering: https://github.com/crystal-lang/crystal/blob/32659bc7c6be76111afc3dc00ef4ac5fcee5806d/src/compiler/crystal/tools/doc/markd_doc_renderer.cr (see https://github.com/crystal-lang/crystal/pull/11040).