Skip to content

Commit 452ac26

Browse files
committed
Merge pull request #233 from mustmodify/patch-1
README should show the basic syntax and dialect options
2 parents 7e2760d + 016f359 commit 452ac26

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ download the version you want (minified or not).
4141

4242
## Usage
4343

44+
The basic interface is:
45+
```js
46+
md_content = "Hello.\n\n* This is markdown.\n* It is fun\n* Love it or leave it."
47+
html_content = markdown.toHTML( md_content );
48+
```
49+
50+
toHTML also accepts a dialect argument:
51+
52+
```js
53+
md_content = "Vessel | Captain\n-----------|-------------\nNCC-1701 | James T Kirk\nNCC-1701 A | James T Kirk\nNCC-1701 D | Picard";
54+
html_content = markdown.toHTML( md_content, 'Maruku');
55+
```
56+
4457
### Node
4558

4659
The simple way to use it with Node is:

0 commit comments

Comments
 (0)