UNPKG

1.85 kBMarkdownView Raw
1# marked(1) -- a javascript markdown parser
2
3## SYNOPSIS
4
5`marked` [`-o` <output file>] [`-i` <input file>] [`-s` <markdown string>] [`-c` <config file>] [`--help`] [`--version`] [`--tokens`] [`--pedantic`] [`--gfm`] [`--breaks`] [`--no-etc...`] [`--silent`] [filename]
6
7## DESCRIPTION
8
9marked is a full-featured javascript markdown parser, built for speed.
10It also includes multiple GFM features.
11
12## EXAMPLES
13
14```sh
15cat in.md | marked > out.html
16```
17
18```sh
19echo "hello *world*" | marked
20```
21
22```sh
23marked -o out.html -i in.md --gfm
24```
25
26```sh
27marked --output="hello world.html" -i in.md --no-breaks
28```
29
30## OPTIONS
31
32* -o, --output [output file]
33Specify file output. If none is specified, write to stdout.
34
35* -i, --input [input file]
36Specify file input, otherwise use last argument as input file.
37If no input file is specified, read from stdin.
38
39* -s, --string [markdown string]
40Specify string input instead of a file.
41
42* -c, --config [config file]
43Specify config file to use instead of the default `~/.marked.json` or `~/.marked.js` or `~/.marked/index.js`.
44
45* -t, --tokens
46Output a token list instead of html.
47
48* --pedantic
49Conform to obscure parts of markdown.pl as much as possible.
50Don't fix original markdown bugs.
51
52* --gfm
53Enable github flavored markdown.
54
55* --breaks
56Enable GFM line breaks. Only works with the gfm option.
57
58* --no-breaks, -no-etc...
59The inverse of any of the marked options above.
60
61* --silent
62Silence error output.
63
64* -h, --help
65Display help information.
66
67## CONFIGURATION
68
69For configuring and running programmatically.
70
71Example
72
73```js
74import { Marked } from 'marked';
75const marked = new Marked({ gfm: true });
76marked.parse('*foo*');
77```
78
79## BUGS
80
81Please report any bugs to <https://github.com/markedjs/marked>.
82
83## LICENSE
84
85Copyright (c) 2011-2014, Christopher Jeffrey (MIT License).
86
87## SEE ALSO
88
89markdown(1), nodejs(1)