Skip to content

Commit 8ef8735

Browse files
committed
Update example in readme.md
1 parent 4c0a357 commit 8ef8735

File tree

1 file changed

+17
-48
lines changed

1 file changed

+17
-48
lines changed

readme.md

Lines changed: 17 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,66 +15,35 @@ npm install mdast-comment-marker
1515
```javascript
1616
var marker = require('mdast-comment-marker');
1717

18-
var result = marker({
18+
console.log(marker({
1919
type: 'html',
2020
value: '<!--foo-->'
21-
});
22-
```
23-
24-
Yields:
21+
}));
2522

26-
```json
27-
{
28-
"name": "foo",
29-
"attributes": "",
30-
"parameters": {},
31-
"node": {
32-
"type": "html",
33-
"value": "<!--foo-->"
34-
}
35-
}
36-
```
37-
38-
Parameters:
39-
40-
```javascript
41-
result = marker({
23+
console.log(marker({
4224
type: 'html',
4325
value: '<!--foo bar baz=12.4 qux="test test" quux=\'false\'-->'
44-
});
45-
```
46-
47-
Yields:
26+
}));
4827

49-
```json
50-
{
51-
"name": "foo",
52-
"attributes": "bar baz=12.4 qux=\"test test\" quux='false'",
53-
"parameters": {
54-
"bar": true,
55-
"baz": 12.4,
56-
"qux": "test test",
57-
"quux": false
58-
},
59-
"node": {
60-
"type": "html",
61-
"value": "<!--foo bar baz=12.4 qux=\"test test\" quux='false'-->"
62-
}
63-
}
64-
```
65-
66-
Non-markers:
67-
68-
```javascript
69-
result = marker({
28+
console.log(marker({
7029
type: 'html',
7130
value: '<!doctype html>'
72-
});
31+
}));
7332
```
7433

7534
Yields:
7635

77-
```json
36+
```js
37+
{ name: 'foo',
38+
attributes: '',
39+
parameters: {},
40+
node: { type: 'html', value: '<!--foo-->' } }
41+
{ name: 'foo',
42+
attributes: 'bar baz=12.4 qux="test test" quux=\'false\'',
43+
parameters: { bar: true, baz: 12.4, qux: 'test test', quux: false },
44+
node:
45+
{ type: 'html',
46+
value: '<!--foo bar baz=12.4 qux="test test" quux=\'false\'-->' } }
7847
null
7948
```
8049

0 commit comments

Comments
 (0)