Skip to content

Commit a894a0e

Browse files
committed
docs: add mention to makeMd() to reamde.md
1 parent e4b0e69 commit a894a0e

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,29 @@ Check our [wiki pages][wiki] for examples and a more in-depth documentation.
106106

107107
### Node
108108

109+
**Markdown to HTML**
109110
```js
110111
var showdown = require('showdown'),
111112
converter = new showdown.Converter(),
112113
text = '# hello, markdown!',
113114
html = converter.makeHtml(text);
114115
```
115116

117+
**HTML to Markdown**
118+
```js
119+
var showdown = require('showdown'),
120+
converter = new showdown.Converter(),
121+
html = '<a href="https://patreon.com/showdownjs">Please Support us!</a>',
122+
md = converter.makeMarkdown(text);
123+
```
124+
125+
116126
### Browser
117127

118128
```js
119129
var converter = new showdown.Converter(),
120-
text = '# hello, markdown!',
121-
html = converter.makeHtml(text);
130+
html = converter.makeHtml('# hello, markdown!'),
131+
md = converter.makeMd('<a href="https://patreon.com/showdownjs">Please Support us!</a>');
122132
```
123133

124134
### Output
@@ -129,6 +139,10 @@ Both examples should output...
129139
<h1 id="hellomarkdown">hello, markdown!</h1>
130140
```
131141

142+
```md
143+
[Please Support us!](https://patreon.com/showdownjs)
144+
```
145+
132146
## Options
133147

134148
You can change some of showdown's default behavior through options.

0 commit comments

Comments
 (0)