From a894a0e1db8cd7f33dc16579dd976ef3bf599780 Mon Sep 17 00:00:00 2001 From: Estevao Soares dos Santos Date: Sat, 10 Nov 2018 02:51:19 +0000 Subject: [PATCH] docs: add mention to makeMd() to reamde.md --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b57ca80..4906e0b 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ Check our [wiki pages][wiki] for examples and a more in-depth documentation. ### Node +**Markdown to HTML** ```js var showdown = require('showdown'), converter = new showdown.Converter(), @@ -113,12 +114,21 @@ var showdown = require('showdown'), html = converter.makeHtml(text); ``` +**HTML to Markdown** +```js +var showdown = require('showdown'), + converter = new showdown.Converter(), + html = 'Please Support us!', + md = converter.makeMarkdown(text); +``` + + ### Browser ```js var converter = new showdown.Converter(), - text = '# hello, markdown!', - html = converter.makeHtml(text); + html = converter.makeHtml('# hello, markdown!'), + md = converter.makeMd('Please Support us!'); ``` ### Output @@ -129,6 +139,10 @@ Both examples should output...

hello, markdown!

``` +```md +[Please Support us!](https://patreon.com/showdownjs) +``` + ## Options You can change some of showdown's default behavior through options.