public
Description: An implementation of markdown in C, using a PEG grammar
Clone URL: git://github.com/jgm/peg-markdown.git
Modified README (removed memory leak message).
jgm (author)
Wed Jun 11 22:08:41 -0700 2008
commit  388db79e26a2d8cd71710826d4037c01b6024a44
tree    45834fa9f1c0f4f3ef47c1297eef26d5d871c1ce
parent  f41ebd29cd9b524bfc1ed43351e3cf290ba87f62
0
...
9
10
11
12
13
14
15
16
17
...
71
72
73
74
75
76
77
78
79
...
92
93
94
95
96
97
98
99
100
101
 
 
 
 
 
 
102
103
104
...
9
10
11
 
 
 
12
13
14
...
68
69
70
 
 
 
71
72
73
...
86
87
88
 
 
 
 
 
 
 
89
90
91
92
93
94
95
96
97
0
@@ -9,9 +9,6 @@ modification and extension.
0
 It is pretty fast. A 179K text file that takes 5.7 seconds for
0
 Markdown.pl (v. 1.0.1) to parse takes only 0.14 seconds for this
0
 markdown. It does, however, use a fair amount of memory.
0
-It still has some memory leaks and thus should not be used in
0
-a long-running application. (I hope to fix this problem; patches
0
-are welcome.)
0
 
0
 Installing
0
 ==========
0
@@ -71,9 +68,6 @@ Hacking
0
 It should be pretty easy to modify the program to produce other formats
0
 than HTML or LaTeX, and to parse syntax extensions. A quick guide:
0
 
0
- * `markdown_peg.h` contains declarations for both `markdown_parser.leg`
0
- and `markdown_output.c`.
0
-
0
   * `markdown_parser.leg` contains the grammar itself, the `markdown()`
0
     function, and some utility functions used by the parser actions.
0
 
0
@@ -92,13 +86,12 @@ than HTML or LaTeX, and to parse syntax extensions. A quick guide:
0
     of `markdown_parser.leg`), using existing extensions as a guide.
0
     New inline elements will need to be added to `Inline =`; new block
0
     elements will need to be added to `Block =`. If you need to add new
0
- types of elements (e.g. `FOOTNOTE`), modify the `keys` enum. By using
0
- `&{ }` rules one can selectively disable extensions depending
0
- on command-line options. For example, `&{ extension(EXT_SMART) }`
0
- succeeds only if the `EXT_SMART` bit of the global
0
- `syntax_extensions` is set. Add your option to `markdown_extensions`,
0
- and modify the option parsing in `markdown.c` so that your option gets
0
- set appropriately.
0
+ types of elements, modify the `keys` enum. By using `&{ }` rules
0
+ one can selectively disable extensions depending on command-line
0
+ options. For example, `&{ extension(EXT_SMART) }` succeeds only if
0
+ the `EXT_SMART` bit of the global `syntax_extensions` is set. Add
0
+ your option to `markdown_extensions`, and modify the option parsing
0
+ in `markdown.c` so that your option gets set appropriately.
0
 
0
   * Note: Avoid using `[^abc]` character classes in the grammar, because they
0
     cause problems with non-ascii input. Instead, use: `( !'a' !'b' !'c' . )`

Comments

    No one has commented yet.