Closed
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Problem
Heya, I would like to directly import/use the compiler, on a pre-created list of events.
I think this is currently not possible?
Obviously this is the key function provided by this package, then fromMarkdown
is just a wrapper around it and the upstream postprocess
/parse
/postprocess
functions (all importable)
Solution
Allow for e.g.
import {compiler} from 'mdast-util-from-markdown/lib/index'
compiler(options)(events)
I guess this just requires the addition of export function compiler...
, and a small modification of package.json
, ilke in micromark itself:
{
"exports": {
".": {
"development": "./dev/index.js",
"default": "./index.js"
},
"./lib/index": {
"development": "./dev/lib/index.js",
"default": "./lib/index.js"
},
"./lib/index.js": {
"development": "./dev/lib/index.js",
"default": "./lib/index.js"
}
}
}
Alternatives
Don't think so