commonmark
commonmark copied to clipboard
Refactor rendering approach
There are several rendering-related ideas I'd like to explore for v3:
- [ ] Avoiding recursion (parsing and AST iteration already avoid recursion)
- [ ] Using an
OutputWriterobject - [ ] Investigate performance of writing to a
php://memorystream instead of concatenating strings - [ ] Allowing renderers to determine what to render (à la Symfony's
NormalizerInterface) so that renderers could potentially handle multiple node types without needing to tell the Environment in advance - [ ] Better support for multiple render formats (
html,md,xml) - [ ] Simplifying the creation of custom renderers (see #967)
Whether these actually get implemented will depend on how the testing goes.