From 101b0be196c987da50fdf02b656388650d5227d1 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Thu, 23 Jan 2025 10:10:40 +0100 Subject: [PATCH] Trim result because it sometimes has a newline --- src/Elastic.Markdown/Helpers/Markdown.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Elastic.Markdown/Helpers/Markdown.cs b/src/Elastic.Markdown/Helpers/Markdown.cs index 78d1798..893ab60 100644 --- a/src/Elastic.Markdown/Helpers/Markdown.cs +++ b/src/Elastic.Markdown/Helpers/Markdown.cs @@ -11,6 +11,6 @@ public static string StripMarkdown(string markdown) { using var writer = new StringWriter(); Markdig.Markdown.ToPlainText(markdown, writer); - return writer.ToString(); + return writer.ToString().TrimEnd('\n'); } }