Skip to content

v0.4.0

Compare
Choose a tag to compare
@MKRhere MKRhere released this 19 Sep 21:57
· 12 commits to master since this release
85c16ad

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 string

There are some changes to the advanced API:

  • serialiseWith now takes two arguments, serialiser and escaper.
  • Serialiser and Escaper types are exported, for more convenience if you want to implement your own.
  • Serialiser now takes (match: string, node: Node); see types for more details.