-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from cm-ayf/options
Options
- Loading branch information
Showing
7 changed files
with
473 additions
and
354 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
import type {Extension as MicromarkExtension} from 'micromark-util-types'; | ||
import {codes} from 'micromark-util-symbol'; | ||
import type {Options} from '../index.js'; | ||
import {attributeListDefinition} from './definition.js'; | ||
import {blockInlineAttributeList} from './block-inline.js'; | ||
import {spanInlineAttributeList} from './span-inline.js'; | ||
|
||
export const micromarkExtension: MicromarkExtension = { | ||
contentInitial: { | ||
[codes.leftCurlyBrace]: attributeListDefinition, | ||
}, | ||
flow: { | ||
[codes.leftCurlyBrace]: blockInlineAttributeList, | ||
}, | ||
text: { | ||
[codes.leftCurlyBrace]: spanInlineAttributeList, | ||
}, | ||
}; | ||
export function micromarkExtension(options?: Options): MicromarkExtension { | ||
return { | ||
contentInitial: { | ||
[codes.leftCurlyBrace]: attributeListDefinition(options), | ||
}, | ||
flow: { | ||
[codes.leftCurlyBrace]: blockInlineAttributeList(options), | ||
}, | ||
text: { | ||
[codes.leftCurlyBrace]: spanInlineAttributeList(options), | ||
}, | ||
}; | ||
} |
Oops, something went wrong.