This commit is contained in:
2024-03-22 03:47:51 +05:30
parent 8bcf3d211e
commit 89819f6fe2
28440 changed files with 3211033 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
/**
* @typedef {import('micromark-util-types').Extension} Extension
*/
import {directiveContainer} from './directive-container.js'
import {directiveLeaf} from './directive-leaf.js'
import {directiveText} from './directive-text.js'
/**
* Create an extension for `micromark` to enable directive syntax.
*
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions`, to
* enable directive syntax.
*/
export function directive() {
return {
text: {
[58]: directiveText
},
flow: {
[58]: [directiveContainer, directiveLeaf]
}
}
}