In my opinion, soft breaks are absolutely useless, would you write your content in markdown and not add space between paragraphs?
Besides that some content has to be displayed with hard breaks and it's annoying to add a <br>
or other escape character.
Astro uses remark
to render markdown so if you want to add hard breaks you have to install the remark-breaks
plugin.
npm install remark-breaks
Then modify astro.config.mjs
and enable the plugin.
import remarkBreaks from 'remark-breaks';
export default defineConfig({
markdown: { remarkPlugins: [remarkBreaks] },
});
Top comments (0)