Prettier formats code in fenced code blocks! When I type three backticks and
then a code, Prettier evaluates the code in the block and tries to format it per
my global .prettierrc.
I produce a lot of technical writing in markdown. I’ve often wondered if my
fenced code blocks are valid, since I sometimes type them by hand. With
Prettier, as long as I add a language identifier (e.g. typescript), that
language is supported and configured for Prettier autoformatting, it will run on
the block.
You can disable it with a <!-- prettier-ignore --> comment.