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