mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-09 19:44:56 +02:00
26 lines
595 B
JavaScript
26 lines
595 B
JavaScript
/**
|
|
* @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]
|
|
}
|
|
}
|
|
}
|