Skip to content

Commit 6ac4d82

Browse files
chore(docs): Improved CLI Examples (#2303)
1 parent d098d55 commit 6ac4d82

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,21 @@ Also read about:
4747

4848
**CLI**
4949

50+
5051
``` bash
52+
# Example with stdin input
5153
$ marked -o hello.html
5254
hello world
5355
^D
5456
$ cat hello.html
5557
<p>hello world</p>
5658
```
5759

60+
```bash
61+
# Print all options
62+
$ marked --help
63+
```
64+
5865
**Browser**
5966

6067
```html

docs/INDEX.md

+17
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ These documentation pages are also rendered using marked 💯
3030
**CLI**
3131

3232
``` bash
33+
# Example with stdin input
3334
$ marked -o hello.html
3435
hello world
3536
^D
@@ -38,10 +39,26 @@ $ cat hello.html
3839
```
3940

4041
``` bash
42+
# Example with string input
4143
$ marked -s "*hello world*"
4244
<p><em>hello world</em></p>
4345
```
4446

47+
```bash
48+
# Example with file input
49+
50+
echo "**bold text example**" > readme.md
51+
52+
$ marked -i readme.md -o readme.html
53+
$ cat readme.html
54+
<p><strong>bold text example</strong></p>
55+
```
56+
57+
```bash
58+
# Print all options
59+
$ marked --help
60+
```
61+
4562
**Browser**
4663

4764
```html

0 commit comments

Comments
 (0)