Skip to content

Commit 2e89b93

Browse files
committed
Add support for directives, math, MDX
1 parent 17acf6f commit 2e89b93

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,17 @@ export const phrasing =
2929
'image',
3030
'imageReference',
3131
'inlineCode',
32+
// Enabled by `mdast-util-math`:
33+
'inlineMath',
3234
'link',
3335
'linkReference',
36+
// Enabled by `mdast-util-mdx`:
37+
'mdxJsxTextElement',
38+
// Enabled by `mdast-util-mdx`:
39+
'mdxTextExpression',
3440
'strong',
35-
'text'
41+
'text',
42+
// Enabled by `mdast-util-directive`:
43+
'textDirective'
3644
])
3745
)

test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,8 @@ test('phrasing', async function (t) {
5151
assert.equal(phrasing({type: 'list'}), false)
5252
}
5353
)
54+
55+
await t.test('should support common extensions', async function () {
56+
assert.equal(phrasing({type: 'textDirective'}), true)
57+
})
5458
})

0 commit comments

Comments
 (0)