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
@@ -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
- * `markdown_peg.h` contains declarations for both `markdown_parser.leg`
0
- and `markdown_output.c`.
0
* `markdown_parser.leg` contains the grammar itself, the `markdown()`
0
function, and some utility functions used by the parser actions.
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
+ 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
* 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.