Replies: 2 comments
-
Thanks for the feedback! If you're looking for a quick workaround, here's how Astro's docs configure options for smartypants: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Seems like a nice addition to me to allow passing an object config. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
Summary
Please add a way to configure options for the Smartypants markdown formatter.
Background & Motivation
Astro uses
remark-smartypants
to format markdown. The plugin can be disabled by setting themarkdown.smartypants
configuration value tofalse
. However, it seems there's no way to do any more fine-grained configuration for it. It's just all or nothing. This seems to be inconsistent with another plugin,remark-reype
, where Astro allows passing options to it via themarkdown.remarkRehype
configuration value.The
remark-smartypants
readme says it takes the same options as retext-smartypants. I would like to be able to configure these options.Why? Because I may want some of the formatting features, such as converting hyphens to dashes and dots to ellipses, but not others such as the questionable feature of converting apostrophes to single quotes. An individual project may have styling constraints, etc. and so it's useful to be able to control the generated output.
Some examples of people taking issue with the generated output from Smartypants:
@astrojs/mdx
: “smart quotes” are broken in HTML headers astro#10859Hugo, an alternative SSG, does seem to allow this more fine-grained control over formatting.
Goals
Example
Beta Was this translation helpful? Give feedback.
All reactions