v0.4.0
This is a full rewrite of the core algorithm. We now construct the entities into a tree, and then serialise recursively. The simple case remains unchanged:
toHTML(ctx.message); //-> html string
toMarkdownV2(ctx.message); //-> Markdown stringThere are some changes to the advanced API:
serialiseWithnow takes two arguments,serialiserandescaper.SerialiserandEscapertypes are exported, for more convenience if you want to implement your own.Serialisernow takes(match: string, node: Node); see types for more details.