From 1fb8ea0411a900c2d860755fe0f7dde48ce31dd5 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Thu, 22 Jun 2023 10:48:45 +0200 Subject: [PATCH] Return raw markdown in the Delivery API (#14429) * Return raw markdown in the Delivery API * Reflect markdown value converter changes in the unit tests --- .../ValueConverters/MarkdownEditorValueConverter.cs | 3 +-- .../DeliveryApi/MarkdownEditorValueConverterTests.cs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs index 3efbce8fb9..9aeeb02d92 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs @@ -72,7 +72,6 @@ public class MarkdownEditorValueConverter : PropertyValueConverterBase, IDeliver return string.Empty; } - var mark = new Markdown(); - return mark.Transform(markdownString); + return markdownString; } } diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/DeliveryApi/MarkdownEditorValueConverterTests.cs b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/DeliveryApi/MarkdownEditorValueConverterTests.cs index 8b9ef31bc7..84ee7b0841 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/DeliveryApi/MarkdownEditorValueConverterTests.cs +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/DeliveryApi/MarkdownEditorValueConverterTests.cs @@ -17,8 +17,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Core.DeliveryApi; [TestFixture] public class MarkdownEditorValueConverterTests : PropertyValueConverterTests { - [TestCase("hello world", "

hello world

")] - [TestCase("hello *world*", "

hello world

")] + [TestCase("hello world", "hello world")] + [TestCase("hello *world*", "hello *world*")] [TestCase("", "")] [TestCase(null, "")] [TestCase(123, "")]