From eb2f6aeca891135389e58da0016c60af1363df61 Mon Sep 17 00:00:00 2001
From: chaosarium <38693485+chaosarium@users.noreply.github.com>
Date: Mon, 09 Jan 2023 22:14:11 +0000
Subject: [PATCH] Fix callout behaviour inconsistent with Obsidian (closes #168) (#268)

---
 layouts/partials/textprocessing.html |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/layouts/partials/textprocessing.html b/layouts/partials/textprocessing.html
index dbcc053..09e2318 100644
--- a/layouts/partials/textprocessing.html
+++ b/layouts/partials/textprocessing.html
@@ -127,6 +127,7 @@
   {{end}}
   {{ $content = $content | replaceRE `\[![a-zA-Z]+\][-\+]?` "" }}
   {{ $content = $content | replaceRE "blockquote class=callout" "blockquote" }}
+  {{ $content = $content | replaceRE `(?s)(<blockquote class="\S+-callout">.*?)<br>(.*?<\/blockquote)` `${1}</p><p>${2}` }}
 {{end}}
 
 {{/* Make ==text== into <mark>text</mark> */}}

--
Gitblit v1.10.0