@@ -18,16 +18,8 @@ I try to keep the grammar in sync with the C version, by
18
18
cherry-picking relevant changes. In the commit history the
19
19
corresponding revisions have a suffix * [ jgm/peg-markdown] .*
20
20
21
- A simple benchmark has been done by comparing the
22
- execution times of the Go binary (cmd/main.go) and the
23
- original C implementation's binary needed for processing
24
- a Markdown document, which had been created by
25
- concatenating ten [ Markdown syntax descriptions] [ syntax ] .
26
-
27
- [ syntax ] : http://daringfireball.net/projects/markdown/syntax.text
28
-
29
- The C version is still around 1.3x faster than the Go version.
30
-
21
+ The Markdown parser has a performance similar to that of
22
+ the original C version, and consumes less memory.
31
23
32
24
## Installation
33
25
@@ -38,24 +30,7 @@ Provided you have a copy of Go 1, and git is available,
38
30
should download and install the package according to
39
31
your GOPATH settings.
40
32
41
- See doc.go for an example how to use the package. There has
42
- been an API change recently: Where you previously wrote
43
-
44
- buf, err := ioutil.ReadAll(os.Stdin)
45
- ...
46
- doc := markdown.Parse(string(buf), markdown.Extensions{Smart: true})
47
- doc.WriteHtml(w)
48
-
49
- you would now write:
50
-
51
- p := markdown.NewParser(&markdown.Extensions{Smart: true})
52
-
53
- w := bufio.NewWriter(os.Stdout)
54
- p.Markdown(os.Stdin, markdown.ToHTML(w))
55
- w.Flush()
56
-
57
- One purpose of the change is to have a Parser that can be
58
- reused between invocations of the converter.
33
+ See doc.go for an example how to use the package.
59
34
60
35
---
61
36
0 commit comments