|
11 | 11 | Extension for [`mdast-util-from-markdown`][from-markdown] and/or
|
12 | 12 | [`mdast-util-to-markdown`][to-markdown] to support frontmatter in **[mdast][]**.
|
13 | 13 | When parsing (`from-markdown`), must be combined with
|
14 |
| -[`micromark-extension-frontmatter`][extension-frontmatter]. |
| 14 | +[`micromark-extension-frontmatter`][extension]. |
15 | 15 |
|
16 | 16 | You probably shouldn’t use this package directly, but instead use
|
17 | 17 | [`remark-frontmatter`][remark-frontmatter] with **[remark][]**.
|
@@ -42,13 +42,13 @@ And our script, `example.js`, looks as follows:
|
42 | 42 | var fs = require('fs')
|
43 | 43 | var fromMarkdown = require('mdast-util-from-markdown')
|
44 | 44 | var toMarkdown = require('mdast-util-to-markdown')
|
45 |
| -var frontmatterSyntax = require('micromark-extension-frontmatter') |
| 45 | +var syntax = require('micromark-extension-frontmatter') |
46 | 46 | var frontmatter = require('mdast-util-frontmatter')
|
47 | 47 |
|
48 | 48 | var doc = fs.readFileSync('example.md')
|
49 | 49 |
|
50 | 50 | var tree = fromMarkdown(doc, {
|
51 |
| - extensions: [frontmatterSyntax(['yaml', 'toml'])], |
| 51 | + extensions: [syntax(['yaml', 'toml'])], |
52 | 52 | mdastExtensions: [frontmatter.fromMarkdown(['yaml', 'toml'])]
|
53 | 53 | })
|
54 | 54 |
|
@@ -108,7 +108,7 @@ Options are the same as [`micromark-extension-frontmatter`][options].
|
108 | 108 | — remark plugin to support frontmatter
|
109 | 109 | * [`micromark/micromark`][micromark]
|
110 | 110 | — the smallest commonmark-compliant markdown parser that exists
|
111 |
| -* [`micromark/micromark-extension-frontmatter`][extension-frontmatter] |
| 111 | +* [`micromark/micromark-extension-frontmatter`][extension] |
112 | 112 | — micromark extension to parse frontmatter
|
113 | 113 | * [`syntax-tree/mdast-util-from-markdown`][from-markdown]
|
114 | 114 | — mdast parser using `micromark` to create mdast from markdown
|
@@ -181,6 +181,6 @@ abide by its terms.
|
181 | 181 |
|
182 | 182 | [micromark]: https://github.com/micromark/micromark
|
183 | 183 |
|
184 |
| -[extension-frontmatter]: https://github.com/micromark/micromark-extension-frontmatter |
| 184 | +[extension]: https://github.com/micromark/micromark-extension-frontmatter |
185 | 185 |
|
186 | 186 | [options]: https://github.com/micromark/micromark-extension-frontmatter#options
|
0 commit comments