Skip to content

Commit c1263ec

Browse files
committed
Update readme
1 parent a52362b commit c1263ec

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

readme.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,41 @@ console.log(commentMarker({
4141
value: '<!doctype html>'
4242
}));
4343

44-
// Also supports MDX@1 comment nodes.
44+
// Also supports MDX@2 expressions:
4545
console.log(commentMarker({
46-
type: 'comment',
47-
value: 'bar'
46+
type: 'mdxFlowExpression',
47+
value: '/* lint disable heading-style */'
4848
}));
4949
```
5050

5151
Yields:
5252

5353
```js
54-
{ name: 'foo',
54+
{
55+
name: 'foo',
5556
attributes: '',
5657
parameters: {},
57-
node: { type: 'html', value: '<!--foo-->' } }
58-
{ name: 'foo',
59-
attributes: 'bar baz=12.4 qux="test test" quux=\'false\'',
58+
node: { type: 'html', value: '<!--foo-->' }
59+
}
60+
{
61+
name: 'foo',
62+
attributes: `bar baz=12.4 qux="test test" quux='false'`,
6063
parameters: { bar: true, baz: 12.4, qux: 'test test', quux: false },
61-
node:
62-
{ type: 'html',
63-
value: '<!--foo bar baz=12.4 qux="test test" quux=\'false\'-->' } }
64+
node: {
65+
type: 'html',
66+
value: `<!--foo bar baz=12.4 qux="test test" quux='false'-->`
67+
}
68+
}
6469
null
65-
{ name: 'bar',
66-
attributes: '',
67-
parameters: {},
68-
node: { type: 'comment', value: 'bar' } }
70+
{
71+
name: 'lint',
72+
attributes: 'disable heading-style',
73+
parameters: { disable: true, 'heading-style': true },
74+
node: {
75+
type: 'mdxFlowExpression',
76+
value: '/* lint disable heading-style */'
77+
}
78+
}
6979
```
7080

7181
## API

0 commit comments

Comments
 (0)