Skip to content

Commit

Permalink
feat(mdx-processor): add smartypants
Browse files Browse the repository at this point in the history
Closes #721
  • Loading branch information
francinelucca committed Oct 21, 2022
1 parent 43a97d2 commit 627ee0f
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 1 deletion.
168 changes: 168 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/mdx-processor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"image-extensions": "^1.1.0",
"rehype-urls": "^1.1.1",
"remark-gfm": "^3.0.1",
"remark-smartypants": "^2.0.0",
"remark-unwrap-images": "^3.0.1",
"vfile": "^5.3.5",
"vfile-matter": "^4.0.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/mdx-processor/src/main/mdx-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import * as runtime from 'react/jsx-runtime.js'
import { renderToString } from 'react-dom/server.js'
import rehypeUrls from 'rehype-urls'
import remarkGfm from 'remark-gfm'
import remarkSmartyPants from 'remark-smartypants'
import remarkUnwrapImages from 'remark-unwrap-images'
import { VFile } from 'vfile'
import { matter } from 'vfile-matter'
Expand Down Expand Up @@ -106,7 +107,8 @@ class MdxProcessor {
}
],
remarkGfm,
remarkUnwrapImages
remarkUnwrapImages,
remarkSmartyPants
],
rehypePlugins: [[rehypeUrls, this.config.imageResolverPlugin]]
})
Expand Down

0 comments on commit 627ee0f

Please sign in to comment.