diff options
author | 2023-01-06 09:26:02 -0500 | |
---|---|---|
committer | 2023-01-06 09:26:02 -0500 | |
commit | 93e633922c2e449df3bb2357b3683af1d3c0e07b (patch) | |
tree | 5a81cd3e18653bef795a9bb8c8e993416fb48e42 /packages/integrations/mdx/src/plugins.ts | |
parent | 04bf679a5d509197aa3b7587e511588f652e886e (diff) | |
download | astro-93e633922c2e449df3bb2357b3683af1d3c0e07b.tar.gz astro-93e633922c2e449df3bb2357b3683af1d3c0e07b.tar.zst astro-93e633922c2e449df3bb2357b3683af1d3c0e07b.zip |
Add SmartyPants flag (#5769)
* feat: add smartypants flag
* test: smartypants in markdown and mdx
* docs: Smartypants -> SmartyPants
* chore: changeset
* chore: update changeset with 1.0 -> 2.0 in mind
* chore: bump to minor change
Diffstat (limited to 'packages/integrations/mdx/src/plugins.ts')
-rw-r--r-- | packages/integrations/mdx/src/plugins.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/integrations/mdx/src/plugins.ts b/packages/integrations/mdx/src/plugins.ts index f5557b8a3..6637b57d7 100644 --- a/packages/integrations/mdx/src/plugins.ts +++ b/packages/integrations/mdx/src/plugins.ts @@ -14,6 +14,7 @@ import type { Image } from 'mdast'; import { pathToFileURL } from 'node:url'; import rehypeRaw from 'rehype-raw'; import remarkGfm from 'remark-gfm'; +import remarkSmartypants from 'remark-smartypants'; import { visit } from 'unist-util-visit'; import type { VFile } from 'vfile'; import { MdxOptions } from './index.js'; @@ -153,6 +154,9 @@ export async function getRemarkPlugins( if (mdxOptions.gfm) { remarkPlugins.push(remarkGfm); } + if (mdxOptions.smartypants) { + remarkPlugins.push(remarkSmartypants); + } remarkPlugins = [...remarkPlugins, ...ignoreStringPlugins(mdxOptions.remarkPlugins)]; |