Skip to content

Commit d507d50

Browse files
committed
Add better docs
1 parent 052ad82 commit d507d50

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

readme.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
**[mdast][]** utility to parse markdown.
1212

13+
## When to use this
14+
15+
Use this if you want to use **[micromark][]** but need an AST.
16+
Use **[remark][]** instead, which includes both to provide a nice interface and
17+
hundreds of plugins.
18+
1319
## Install
1420

1521
This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c):
@@ -69,6 +75,11 @@ Now, running `node example` yields (positional info removed for brevity):
6975
This package exports the following identifier: `fromMarkdown`.
7076
There is no default export.
7177

78+
The export map supports the endorsed
79+
[`development` condition](https://nodejs.org/api/packages.html#packages_resolving_user_conditions).
80+
Run `node --conditions development module.js` to get instrumented dev code.
81+
Without this condition, production code is loaded.
82+
7283
### `fromMarkdown(doc[, encoding][, options])`
7384

7485
Parse markdown to a **[mdast][]** tree.
@@ -128,7 +139,7 @@ Array of mdast extensions (`Array.<MdastExtension>`, default: `[]`).
128139

129140
## Security
130141

131-
As Markdown is sometimes used for HTML, and improper use of HTML can open you up
142+
As markdown is sometimes used for HTML, and improper use of HTML can open you up
132143
to a [cross-site scripting (XSS)][xss] attack, use of `mdast-util-from-markdown`
133144
can also be unsafe.
134145
When going to HTML, use this utility in combination with
@@ -209,4 +220,8 @@ abide by its terms.
209220

210221
[sanitize]: https://github.com/syntax-tree/hast-util-sanitize
211222

223+
[micromark]: https://github.com/micromark/micromark
224+
212225
[micromark-extensions]: https://github.com/micromark/micromark#optionsextensions
226+
227+
[remark]: https://github.com/remarkjs/remark

0 commit comments

Comments
 (0)