How can I change the Markdown emphasis from _ to *?
#18741
-
|
I prefer to use And I hope it is a option in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
@lovemilk2333 prettier doesn't have a config option for this, and the team has explicitly rejected adding one. their stance is "fewer options" by design. the reason prettier defaults to practical workaround: disable prettier for markdown and use remark-stringify instead, which actually defaults to // remark.config.mjs
export default {
settings: { emphasis: '*' }
};then in and format markdown with alternatively if you just want linting without auto-fix, use ref: prettier options docs | rejected option request #3463 | remark-stringify settings |
Beta Was this translation helpful? Give feedback.
@lovemilk2333 prettier doesn't have a config option for this, and the team has explicitly rejected adding one. their stance is "fewer options" by design.
the reason prettier defaults to
_is a CommonMark spec thing. underscores have stricter flanking rules (they don't work mid-word likefoo_bar_baz), so they're "safer" as the default. prettier's printer source only switches to*when_would break (adjacent words, nested emphasis, etc.).practical workaround: disable prettier for markdown and use remark-stringify instead, which actually defaults to
*:then in
.prettierignore:and format markdown with
remark . --oβ¦