website/node_modules/remarkable/docs/renderer.md

Renderer

Renderering is the second part of converting markdown to HTML. The renderer converts the list of tokens produced by the Parsers to produce actual HTML code.

Each rendering rule is a function taking four arguments:

Each rule is registered with a name corresponding to a token's type. When the renderer meets a token, it will invoke the rule associated to said token's type and expect the function to return appropriate HTML code.

NB: Rendering rules are not provided with helpers to recursively invoke the renderer and should not do so.



JohnCoene/chirp documentation built on May 25, 2021, 6:33 p.m.