astro/packages/markdown/remark/src/mdast-util-mdxish.ts
Nate Moore cfae9760b2
Improve Markdown + Components usage (#3410)
* feat: use internal MDX tooling for markdown + components

* fix: improve MD + component tests

* chore: add changeset

* fix: make tsc happy

* fix(#3319): add regression test for component children

* fix(markdown): support HTML comments in markdown

* fix(#2474): ensure namespaced components are properly handled in markdown pages

* fix(#3220): ensure html in markdown pages does not have extra surrounding space

* fix(#3264): ensure that remark files pass in file information

* fix(#3254): enable experimentalStaticExtraction for `.md` pages

* fix: revert parsing change

* fix: remove `markdown.mode` option
2022-05-24 17:02:11 -05:00

18 lines
408 B
TypeScript

import {
mdxExpressionFromMarkdown,
mdxExpressionToMarkdown
} from 'mdast-util-mdx-expression'
import {mdxJsxFromMarkdown, mdxJsxToMarkdown} from 'mdast-util-mdx-jsx'
export function mdxFromMarkdown(): any {
return [mdxExpressionFromMarkdown, mdxJsxFromMarkdown]
}
export function mdxToMarkdown(): any {
return {
extensions: [
mdxExpressionToMarkdown,
mdxJsxToMarkdown,
]
}
}