-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, nodes could be handled by their `type`. In combination with elements by their `tagName`. This could result in bugs if for example `<root>`, `<comment>`, or `<text>` or so was used. Now, `handlers` only supports elements by their tag name, and a new `nodeHandlers` exists for (custom) nodes.
- Loading branch information
Showing
5 changed files
with
30 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
/** | ||
* @typedef {import('./lib/state.js').State} State | ||
* @typedef {import('./lib/types.js').Handle} Handle | ||
* @typedef {import('./lib/types.js').NodeHandle} NodeHandle | ||
* @typedef {import('./lib/types.js').Options} Options | ||
*/ | ||
|
||
export {defaultHandlers, toMdast} from './lib/index.js' | ||
export {toMdast} from './lib/index.js' | ||
|
||
export { | ||
handlers as defaultHandlers, | ||
nodeHandlers as defaultNodeHandlers | ||
} from './lib/handlers/index.js' |
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