Skip to content

Commit

Permalink
Remove unwanted MDX ESM import/export support
Browse files Browse the repository at this point in the history
  • Loading branch information
hippotastic committed Jun 8, 2022
1 parent a75a2af commit 85b059d
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 95 deletions.
1 change: 0 additions & 1 deletion packages/markdown/remark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"mdast-util-to-string": "^3.1.0",
"micromark-extension-mdx-expression": "^1.0.3",
"micromark-extension-mdx-md": "^1.0.0",
"micromark-extension-mdxjs-esm": "^1.0.3",
"micromark-util-combine-extensions": "^1.0.0",
"prismjs": "^1.28.0",
"rehype-raw": "^6.1.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/markdown/remark/src/mdxjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// and was adapted to use our fork `@astrojs/micromark-extension-mdx-jsx`
// instead of `micromark-extension-mdx-jsx` to allow some extended syntax.
// See `@astrojs/micromark-extension-mdx-jsx` on NPM for more details.
// Also, support for ESM imports & exports in Markdown content was removed.

import { Parser } from 'acorn';
import acornJsx from 'acorn-jsx';
import { combineExtensions } from 'micromark-util-combine-extensions';
import { mdxExpression } from 'micromark-extension-mdx-expression';
import { mdxJsx } from '@astrojs/micromark-extension-mdx-jsx';
import { mdxMd } from 'micromark-extension-mdx-md';
import { mdxjsEsm } from 'micromark-extension-mdxjs-esm';
import type { Options } from 'micromark-extension-mdx-expression';
import type { Extension } from 'micromark-util-types';

Expand All @@ -24,7 +24,6 @@ export function mdxjs(options: Options): Extension {
);

return combineExtensions([
mdxjsEsm(settings),
mdxExpression(settings),
mdxJsx(settings),
mdxMd
Expand Down
Loading

0 comments on commit 85b059d

Please sign in to comment.