-
-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
55 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference types="remark-parse" /> | ||
/// <reference types="remark-stringify" /> | ||
|
||
import type {Root} from 'hast' | ||
import type {Processor} from 'unified' | ||
|
||
/** | ||
* Create a new unified processor that already uses `remark-parse` and | ||
* `remark-stringify`. | ||
*/ | ||
export const remark: Processor<Root, undefined, undefined, Root, string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ test('remark', async function (t) { | |
await t.test('should accept settings', async function () { | ||
assert.equal( | ||
remark() | ||
// @ts-expect-error: to do: type settings. | ||
.data('settings', {closeAtx: true}) | ||
.processSync('# foo') | ||
.toString(), | ||
|
@@ -139,9 +138,7 @@ test('remark-parse', async function (t) { | |
|
||
await t.test('should support extensions', function () { | ||
const tree = unified() | ||
// @ts-expect-error: to do: type settings. | ||
.data('micromarkExtensions', [gfm()]) | ||
// @ts-expect-error: to do: type settings. | ||
.data('fromMarkdownExtensions', [gfmFromMarkdown()]) | ||
.use(remarkParse) | ||
.parse('* [x] [email protected] ~~strikethrough~~') | ||
|
@@ -210,7 +207,6 @@ test('remark-stringify', async function (t) { | |
|
||
await t.test('should support extensions', async function () { | ||
const result = unified() | ||
// @ts-expect-error: to do: type settings. | ||
.data('toMarkdownExtensions', [gfmToMarkdown()]) | ||
.use(remarkStringify) | ||
.stringify({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters