From 43e6305c45c6365288c1f512702f49ba2e52e941 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 1 Apr 2023 18:37:47 +0200 Subject: Improve user interface --- handler.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'handler.go') diff --git a/handler.go b/handler.go index aa231e5..46e1b02 100644 --- a/handler.go +++ b/handler.go @@ -111,6 +111,9 @@ func recipeGet(w http.ResponseWriter, r *http.Request) { return } + titleRegex := regexp.MustCompile(`\# .*`) + elements[0].DescriptionMarkdown = titleRegex.ReplaceAllString(elements[0].DescriptionMarkdown, "") + // render markdown var buf bytes.Buffer goldmark.Convert([]byte(elements[0].DescriptionMarkdown), &buf) -- cgit v1.2.3-70-g09d2