changes-from-blackfriday.md

 1## Changes from blackfriday
 2
 3This library is derived from blackfriday library. Here's a list of changes.
 4
 5**Redesigned API**
 6
 7- split into 3 separate packages: ast, parser and html (for html renderer). This makes the API more manageable. It also separates e.g. parser option from renderer options
 8- changed how AST node is represented from union-like representation (manually keeping track of the type of the node) to using interface{} (which is a Go way to combine an arbitrary value with its type)
 9
10**Allow re-using most of html renderer logic**
11
12You can implement your own renderer by implementing `Renderer` interface.
13
14Implementing a full renderer is a lot of work and often you just want to tweak html rendering of few node typs.
15
16I've added a way to hook `Renderer.Render` function in html renderer with a custom function that can take over rendering of specific nodes.
17
18I use it myself to do syntax-highlighting of code snippets.
19
20**Speed up go test**
21
22Running `go test` was really slow (17 secs) because it did a poor man's version of fuzzing by feeding the parser all subsets of test strings in order to find panics
23due to incorrect parsing logic.
24
25I've moved that logic to `cmd/crashtest`, so that it can be run on CI but not slow down regular development.
26
27Now `go test` is blazing fast.