From b1422269bb3125cf0d803b1ab396bb3521983f5c Mon Sep 17 00:00:00 2001 From: Nareshkumar Rao Date: Thu, 3 Apr 2025 00:20:47 +0200 Subject: [PATCH] use breaks in markdown --- src/app/blog/write/ContentArea.tsx | 1 + src/app/blog/write/action.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/app/blog/write/ContentArea.tsx b/src/app/blog/write/ContentArea.tsx index 1f4edf7..8c896da 100644 --- a/src/app/blog/write/ContentArea.tsx +++ b/src/app/blog/write/ContentArea.tsx @@ -6,6 +6,7 @@ import { KeyboardEvent } from "react"; const md = new MarkdownIt({ linkify: true, typographer: true, + breaks: true, highlight: (str, lang) => { if (lang && hljs.getLanguage(lang)) { try { diff --git a/src/app/blog/write/action.ts b/src/app/blog/write/action.ts index f9d3214..377cc55 100644 --- a/src/app/blog/write/action.ts +++ b/src/app/blog/write/action.ts @@ -18,6 +18,7 @@ export async function savePostServer( const md = new MarkdownIt({ linkify: true, typographer: true, + breaks: true, highlight: (str, lang) => { if (lang && hljs.getLanguage(lang)) { try {