Skip to content

Commit d42950e

Browse files
committed
Update dev-dependencies
1 parent 81b7fc5 commit d42950e

File tree

2 files changed

+84
-77
lines changed

2 files changed

+84
-77
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"micromark-extension-mdx-expression": "^3.0.0",
5252
"prettier": "^3.0.0",
5353
"remark-cli": "^12.0.0",
54-
"remark-preset-wooorm": "^10.0.0",
54+
"remark-preset-wooorm": "^11.0.0",
5555
"type-coverage": "^2.0.0",
5656
"typescript": "^5.0.0",
5757
"unist-util-remove-position": "^5.0.0",

readme.md

Lines changed: 83 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
[![Backers][backers-badge]][collective]
99
[![Chat][chat-badge]][chat]
1010

11-
[mdast][] extensions to parse and serialize [MDX][] expressions (`{Math.PI}`).
11+
[mdast][github-mdast] extensions to parse and serialize [MDX][mdxjs]
12+
expressions (`{Math.PI}`).
1213

1314
## Contents
1415

@@ -37,27 +38,28 @@
3738
## What is this?
3839

3940
This package contains two extensions that add support for MDX expression syntax
40-
in markdown to [mdast][].
41+
in markdown to [mdast][github-mdast].
4142
These extensions plug into
42-
[`mdast-util-from-markdown`][mdast-util-from-markdown] (to support parsing
43-
expressions in markdown into a syntax tree) and
44-
[`mdast-util-to-markdown`][mdast-util-to-markdown] (to support serializing
45-
expressions in syntax trees to markdown).
43+
[`mdast-util-from-markdown`][github-mdast-util-from-markdown]
44+
(to support parsing expressions in markdown into a syntax tree) and
45+
[`mdast-util-to-markdown`][github-mdast-util-to-markdown]
46+
(to support serializing expressions in syntax trees to markdown).
4647

4748
## When to use this
4849

4950
You can use these extensions when you are working with
5051
`mdast-util-from-markdown` and `mdast-util-to-markdown` already.
5152

5253
When working with `mdast-util-from-markdown`, you must combine this package
53-
with [`micromark-extension-mdx-expression`][extension].
54+
with
55+
[`micromark-extension-mdx-expression`][github-mm-extension-expression].
5456

5557
When you are working with syntax trees and want all of MDX, use
56-
[`mdast-util-mdx`][mdast-util-mdx] instead.
58+
[`mdast-util-mdx`][github-mdast-util-mdx] instead.
5759

58-
All these packages are used in [`remark-mdx`][remark-mdx], which
59-
focusses on making it easier to transform content by abstracting these
60-
internals away.
60+
All these packages are used in [`remark-mdx`][github-remark-mdx],
61+
which focusses on making it easier to transform content by abstracting
62+
these internals away.
6163

6264
## Install
6365

@@ -189,26 +191,31 @@ There is no default export.
189191

190192
### `mdxExpressionFromMarkdown()`
191193

192-
Create an extension for [`mdast-util-from-markdown`][mdast-util-from-markdown]
194+
Create an extension for
195+
[`mdast-util-from-markdown`][github-mdast-util-from-markdown]
193196
to enable MDX expressions in markdown.
194197

195-
When using the [micromark syntax extension][extension] with `addResult`, nodes
196-
will have a `data.estree` field set to an ESTree [`Program`][program] node.
198+
When using the
199+
[micromark syntax extension][github-mm-extension-expression]
200+
with `addResult`,
201+
nodes will have a `data.estree` field set to an ESTree
202+
[`Program`][github-estree-program] node.
197203

198204
###### Returns
199205

200206
Extension for `mdast-util-from-markdown` to enable MDX expressions
201-
([`FromMarkdownExtension`][from-markdown-extension]).
207+
([`FromMarkdownExtension`][github-mdast-util-from-markdown-extension]).
202208

203209
### `mdxExpressionToMarkdown()`
204210

205-
Create an extension for [`mdast-util-to-markdown`][mdast-util-to-markdown]
211+
Create an extension for
212+
[`mdast-util-to-markdown`][github-mdast-util-to-markdown]
206213
to enable MDX expressions in markdown.
207214

208215
###### Returns
209216

210217
Extension for `mdast-util-to-markdown` to enable MDX expressions
211-
([`ToMarkdownExtension`][to-markdown-extension]).
218+
([`ToMarkdownExtension`][github-mdast-util-to-markdown-extension]).
212219

213220
### `MdxFlowExpression`
214221

@@ -297,16 +304,18 @@ interface MdxTextExpressionData extends Data {
297304
MDX expressions have no representation in HTML.
298305
Though, when you are dealing with MDX, you will likely go *through* hast.
299306
You can enable passing MDX expressions through to hast by configuring
300-
[`mdast-util-to-hast`][mdast-util-to-hast] with
307+
[`mdast-util-to-hast`][github-mdast-util-to-hast] with
301308
`passThrough: ['mdxFlowExpression', 'mdxTextExpression']`.
302309

303310
## Syntax
304311

305-
See [Syntax in `micromark-extension-mdx-expression`][syntax].
312+
See [Syntax in
313+
`micromark-extension-mdx-expression`](https://github.com/micromark/micromark-extension-mdx-expression#syntax).
306314

307315
## Syntax tree
308316

309-
The following interfaces are added to **[mdast][]** by this utility.
317+
The following interfaces are added to **[mdast][github-mdast]**
318+
by this utility.
310319

311320
### Nodes
312321

@@ -318,9 +327,9 @@ interface MdxFlowExpression <: Literal {
318327
}
319328
```
320329

321-
**MdxFlowExpression** (**[Literal][dfn-literal]**) represents a JavaScript
322-
expression embedded in flow (block).
323-
It can be used where **[flow][dfn-flow-content]** content is expected.
330+
**MdxFlowExpression** (**[Literal][github-mdast-literal]**)
331+
represents a JavaScript expression embedded in flow (block).
332+
It can be used where **[flow][api-flow-content]** content is expected.
324333
Its content is represented by its `value` field.
325334

326335
For example, the following markdown:
@@ -345,9 +354,9 @@ interface MdxTextExpression <: Literal {
345354
}
346355
```
347356

348-
**MdxTextExpression** (**[Literal][dfn-literal]**) represents a JavaScript
349-
expression embedded in text (span, inline).
350-
It can be used where **[phrasing][dfn-phrasing-content]** content is expected.
357+
**MdxTextExpression** (**[Literal][github-mdast-literal]**)
358+
represents a JavaScript expression embedded in text (span, inline).
359+
It can be used where **[phrasing][api-phrasing-content]** content is expected.
351360
Its content is represented by its `value` field.
352361

353362
For example, the following markdown:
@@ -419,20 +428,20 @@ This utility works with `mdast-util-from-markdown` version 2+ and
419428

420429
## Related
421430

422-
* [`remarkjs/remark-mdx`][remark-mdx]
431+
* [`remark-mdx`][github-remark-mdx]
423432
— remark plugin to support MDX
424-
* [`syntax-tree/mdast-util-mdx`][mdast-util-mdx]
433+
* [`mdast-util-mdx`][github-mdast-util-mdx]
425434
— mdast utility to support MDX
426-
* [`micromark/micromark-extension-mdx-expression`][extension]
435+
* [`micromark-extension-mdx-expression`][github-mm-extension-expression]
427436
— micromark extension to parse MDX expressions
428437

429438
## Contribute
430439

431-
See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for
432-
ways to get started.
433-
See [`support.md`][support] for ways to get help.
440+
See [`contributing.md`][health-contributing] in
441+
[`syntax-tree/.github`][health] for ways to get started.
442+
See [`support.md`][health-support] for ways to get help.
434443

435-
This project has a [code of conduct][coc].
444+
This project has a [code of conduct][health-coc].
436445
By interacting with this repository, organization, or community you agree to
437446
abide by its terms.
438447

@@ -442,90 +451,88 @@ abide by its terms.
442451

443452
<!-- Definitions -->
444453

445-
[build-badge]: https://github.com/syntax-tree/mdast-util-mdx-expression/workflows/main/badge.svg
454+
[api-flow-content]: #flowcontent-mdx-expression
446455

447-
[build]: https://github.com/syntax-tree/mdast-util-mdx-expression/actions
456+
[api-mdx-expression-from-markdown]: #mdxexpressionfrommarkdown
448457

449-
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-mdx-expression.svg
458+
[api-mdx-expression-to-markdown]: #mdxexpressiontomarkdown
450459

451-
[coverage]: https://codecov.io/github/syntax-tree/mdast-util-mdx-expression
460+
[api-mdx-flow-expression]: #mdxflowexpression
452461

453-
[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-mdx-expression.svg
462+
[api-mdx-flow-expression-hast]: #mdxflowexpressionhast
454463

455-
[downloads]: https://www.npmjs.com/package/mdast-util-mdx-expression
464+
[api-mdx-text-expression]: #mdxtextexpression
456465

457-
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-mdx-expression
466+
[api-mdx-text-expression-hast]: #mdxtextexpressionhast
458467

459-
[size]: https://bundlejs.com/?q=mdast-util-mdx-expression
468+
[api-phrasing-content]: #phrasingcontent-mdx-expression
460469

461-
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
470+
[author]: https://wooorm.com
462471

463472
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
464473

465-
[collective]: https://opencollective.com/unified
474+
[build]: https://github.com/syntax-tree/mdast-util-mdx-expression/actions
466475

467-
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
476+
[build-badge]: https://github.com/syntax-tree/mdast-util-mdx-expression/workflows/main/badge.svg
468477

469478
[chat]: https://github.com/syntax-tree/unist/discussions
470479

471-
[npm]: https://docs.npmjs.com/cli/install
472-
473-
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
480+
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
474481

475-
[esmsh]: https://esm.sh
482+
[collective]: https://opencollective.com/unified
476483

477-
[typescript]: https://www.typescriptlang.org
484+
[coverage]: https://codecov.io/github/syntax-tree/mdast-util-mdx-expression
478485

479-
[license]: license
486+
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-mdx-expression.svg
480487

481-
[author]: https://wooorm.com
488+
[downloads]: https://www.npmjs.com/package/mdast-util-mdx-expression
482489

483-
[health]: https://github.com/syntax-tree/.github
490+
[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-mdx-expression.svg
484491

485-
[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
492+
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
486493

487-
[support]: https://github.com/syntax-tree/.github/blob/main/support.md
494+
[esmsh]: https://esm.sh
488495

489-
[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
496+
[github-estree-program]: https://github.com/estree/estree/blob/master/es2015.md#programs
490497

491-
[mdast]: https://github.com/syntax-tree/mdast
498+
[github-mdast]: https://github.com/syntax-tree/mdast
492499

493-
[mdast-util-to-hast]: https://github.com/syntax-tree/mdast-util-to-hast
500+
[github-mdast-literal]: https://github.com/syntax-tree/mdast#literal
494501

495-
[mdast-util-from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown
502+
[github-mdast-util-from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown
496503

497-
[mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
504+
[github-mdast-util-from-markdown-extension]: https://github.com/syntax-tree/mdast-util-from-markdown#extension
498505

499-
[mdast-util-mdx]: https://github.com/syntax-tree/mdast-util-mdx
506+
[github-mdast-util-mdx]: https://github.com/syntax-tree/mdast-util-mdx
500507

501-
[extension]: https://github.com/micromark/micromark-extension-mdx-expression
508+
[github-mdast-util-to-hast]: https://github.com/syntax-tree/mdast-util-to-hast
502509

503-
[syntax]: https://github.com/micromark/micromark-extension-mdx-expression#syntax
510+
[github-mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
504511

505-
[program]: https://github.com/estree/estree/blob/master/es2015.md#programs
512+
[github-mdast-util-to-markdown-extension]: https://github.com/syntax-tree/mdast-util-to-markdown#options
506513

507-
[dfn-literal]: https://github.com/syntax-tree/mdast#literal
514+
[github-mm-extension-expression]: https://github.com/micromark/micromark-extension-mdx-expression
508515

509-
[remark-mdx]: https://mdxjs.com/packages/remark-mdx/
516+
[github-remark-mdx]: https://mdxjs.com/packages/remark-mdx/
510517

511-
[mdx]: https://mdxjs.com
518+
[health]: https://github.com/syntax-tree/.github
512519

513-
[from-markdown-extension]: https://github.com/syntax-tree/mdast-util-from-markdown#extension
520+
[health-coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
514521

515-
[to-markdown-extension]: https://github.com/syntax-tree/mdast-util-to-markdown#options
522+
[health-contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
516523

517-
[api-mdx-expression-from-markdown]: #mdxexpressionfrommarkdown
524+
[health-support]: https://github.com/syntax-tree/.github/blob/main/support.md
518525

519-
[api-mdx-expression-to-markdown]: #mdxexpressiontomarkdown
526+
[license]: license
520527

521-
[api-mdx-flow-expression]: #mdxflowexpression
528+
[mdxjs]: https://mdxjs.com
522529

523-
[api-mdx-text-expression]: #mdxtextexpression
530+
[npm]: https://docs.npmjs.com/cli/install
524531

525-
[api-mdx-flow-expression-hast]: #mdxflowexpressionhast
532+
[size]: https://bundlejs.com/?q=mdast-util-mdx-expression
526533

527-
[api-mdx-text-expression-hast]: #mdxtextexpressionhast
534+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-mdx-expression
528535

529-
[dfn-flow-content]: #flowcontent-mdx-expression
536+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
530537

531-
[dfn-phrasing-content]: #phrasingcontent-mdx-expression
538+
[typescript]: https://www.typescriptlang.org

0 commit comments

Comments
 (0)