-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes GH-4. Reviewed-by: Titus Wormer <tituswormer@gmail.com>
- Loading branch information
1 parent
c64f275
commit ec6eacf
Showing
7 changed files
with
100 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* @typedef {import('mdast').Root} Root | ||
*/ | ||
|
||
import {zone} from 'mdast-zone' | ||
|
||
/** | ||
* @param {Root} tree | ||
*/ | ||
export default function assertion(tree) { | ||
zone(tree, 'foo', function () { | ||
return [] | ||
}) | ||
} |
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,19 @@ | ||
# Foo | ||
|
||
<!--foo start--> | ||
|
||
Foo. | ||
|
||
Foo. | ||
|
||
<!--foo end--> | ||
|
||
Bar. | ||
|
||
<!--foo start--> | ||
|
||
Foo. | ||
|
||
Foo. | ||
|
||
<!--foo end--> |
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,3 @@ | ||
# Foo | ||
|
||
Bar. |
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,19 @@ | ||
/** | ||
* @typedef {import('mdast').Root} Root | ||
*/ | ||
|
||
import {zone} from 'mdast-zone' | ||
|
||
/** | ||
* @param {Root} tree | ||
*/ | ||
export default function assertion(tree) { | ||
zone(tree, 'foo', function () { | ||
return [ | ||
{ | ||
type: 'paragraph', | ||
children: [{type: 'text', value: 'Bar.'}] | ||
} | ||
] | ||
}) | ||
} |
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,15 @@ | ||
# Foo | ||
|
||
<!--foo start--> | ||
|
||
Foo. | ||
|
||
<!--foo end--> | ||
|
||
Bar. | ||
|
||
<!--foo start--> | ||
|
||
Foo. | ||
|
||
<!--foo end--> |
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,7 @@ | ||
# Foo | ||
|
||
Bar. | ||
|
||
Bar. | ||
|
||
Bar. |