Skip to content

Commit

Permalink
Add support for directives, math, MDX
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Feb 1, 2024
1 parent 17acf6f commit 2e89b93
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,17 @@ export const phrasing =
'image',
'imageReference',
'inlineCode',
// Enabled by `mdast-util-math`:
'inlineMath',
'link',
'linkReference',
// Enabled by `mdast-util-mdx`:
'mdxJsxTextElement',
// Enabled by `mdast-util-mdx`:
'mdxTextExpression',
'strong',
'text'
'text',
// Enabled by `mdast-util-directive`:
'textDirective'
])
)
4 changes: 4 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ test('phrasing', async function (t) {
assert.equal(phrasing({type: 'list'}), false)
}
)

await t.test('should support common extensions', async function () {
assert.equal(phrasing({type: 'textDirective'}), true)
})
})

0 comments on commit 2e89b93

Please sign in to comment.