Skip to content

Commit e7910a8

Browse files
authored
Merge pull request #327 from russross/readme-update
Update README for v2
2 parents af57319 + f805c77 commit e7910a8

File tree

1 file changed

+37
-14
lines changed

1 file changed

+37
-14
lines changed

README.md

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,44 @@ It started as a translation from C of [Sundown][3].
1616
Installation
1717
------------
1818

19-
Blackfriday is compatible with Go 1. If you are using an older
20-
release of Go, consider using v1.1 of blackfriday, which was based
21-
on the last stable release of Go prior to Go 1. You can find it as a
22-
tagged commit on github.
19+
Blackfriday is compatible with any modern Go release. With Go 1.7 and git
20+
installed:
2321

24-
With Go 1 and git installed:
25-
26-
go get github.com/russross/blackfriday
22+
go get gopkg.in/russross/blackfriday.v2
2723

2824
will download, compile, and install the package into your `$GOPATH`
2925
directory hierarchy. Alternatively, you can achieve the same if you
3026
import it into a project:
3127

32-
import "github.com/russross/blackfriday"
28+
import "gopkg.in/russross/blackfriday.v2"
3329

3430
and `go get` without parameters.
3531

32+
33+
Versions
34+
--------
35+
36+
Currently maintained and recommended version of Blackfriday is `v2`. It's being
37+
developed on its own branch: https://github.com/russross/blackfriday/v2. You
38+
should install and import it via [gopkg.in][6] at
39+
`gopkg.in/russross/blackfriday.v2`.
40+
41+
Version 2 offers a number of improvements over v1:
42+
43+
* Cleaned up API
44+
* A separate call to [`Parse`][4], which produces an abstract syntax tree for
45+
the document
46+
* Latest bug fixes
47+
* Flexibility to easily add your own rendering extensions
48+
49+
Potential drawbacks:
50+
51+
* Our benchmarks show v2 to be slightly slower than v1. Currently in the
52+
ballpark of around 15%.
53+
* API breakage. If you can't afford modifying your code to adhere to the new API
54+
and don't care too much about the new features, v2 is probably not for you.
55+
56+
3657
Usage
3758
-----
3859

@@ -49,11 +70,10 @@ feature set, use this instead:
4970
### Sanitize untrusted content
5071

5172
Blackfriday itself does nothing to protect against malicious content. If you are
52-
dealing with user-supplied markdown, we recommend running blackfriday's output
53-
through HTML sanitizer such as
54-
[Bluemonday](https://github.com/microcosm-cc/bluemonday).
73+
dealing with user-supplied markdown, we recommend running Blackfriday's output
74+
through HTML sanitizer such as [Bluemonday][5].
5575

56-
Here's an example of simple usage of blackfriday together with bluemonday:
76+
Here's an example of simple usage of Blackfriday together with Bluemonday:
5777

5878
``` go
5979
import (
@@ -253,6 +273,9 @@ License
253273
[Blackfriday is distributed under the Simplified BSD License](LICENSE.txt)
254274
255275
256-
[1]: http://daringfireball.net/projects/markdown/ "Markdown"
257-
[2]: http://golang.org/ "Go Language"
276+
[1]: https://daringfireball.net/projects/markdown/ "Markdown"
277+
[2]: https://golang.org/ "Go Language"
258278
[3]: https://github.com/vmg/sundown "Sundown"
279+
[4]: https://godoc.org/gopkg.in/russross/blackfriday.v2#Parse "Parse func"
280+
[5]: https://github.com/microcosm-cc/bluemonday "Bluemonday"
281+
[6]: https://labix.org/gopkg.in "gopkg.in"

0 commit comments

Comments
 (0)