aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-05-06 20:03:23 +0200
committerache <ache@ache.one>2018-05-06 20:03:23 +0200
commit201799e31c8ff74d0fb6afc433a3f0a80ac92f37 (patch)
tree3e177028ea9378ebc38ecd2c2eb802573197d066 /README.md
parentIt's now a npm package (diff)
Update README
Diffstat (limited to 'README.md')
-rw-r--r--README.md31
1 files changed, 21 insertions, 10 deletions
diff --git a/README.md b/README.md
index fc3f61a..43ad188 100644
--- a/README.md
+++ b/README.md
@@ -58,18 +58,37 @@ const unified = require('unified')
const remarkParse = require('remark-parse')
const stringify = require('rehype-stringify')
const remark2rehype = require('remark-rehype')
+const remarkAttr = require('remark-attr')
-const remarkAttr = require('remark-attr');
```
### Usage:
```javascript
+const testFile = `
+
+Here a test :
+
+![ache avatar](https://ache.one/res/ache.svg){ height=100 }
+
+`
+
unified()
.use(remarkParse)
.use(remarkAttr)
.use(remark2rehype)
.use(stringify)
+ .process( testFile, (err, file) => {
+ console.log(String(file))
+ } )
+```
+
+Output :
+
+```shell
+$ node index.js
+<p>Here a test :</p>
+<p><img src="https://ache.one/res/ache.svg" alt="ache avatar" height="100"></p>
```
@@ -79,17 +98,9 @@ unified()
<!-- GNUv3 or MIT -->
-[build-badge]: https://img.shields.io/travis/zestedesavoir/zmarkdown.svg
-
-[build-status]: https://travis-ci.org/zestedesavoir/zmarkdown
-
-[coverage-badge]: https://img.shields.io/coveralls/zestedesavoir/zmarkdown.svg
-
-[coverage-status]: https://coveralls.io/github/zestedesavoir/zmarkdown
-
[zds]: https://zestedesavoir.com
-[npm]: https://www.npmjs.com/package/remark-ping
+[npm]: https://www.npmjs.com/package/remark-attr
[mdast]: https://github.com/syntax-tree/mdast/blob/master/readme.md