Fixed an issue where bold markdown would not work inside a property description

This commit is contained in:
Dan Lister
2024-12-12 13:44:44 +00:00
committed by Jacob Overgaard
parent 3233b24a4e
commit 4ef50642ad
2 changed files with 4 additions and 4 deletions

View File

@@ -11,8 +11,8 @@ angular.module("umbraco.filters").filter('simpleMarkdown', function () {
}
return text
.replace(/\*\*(.*)\*\*/gim, '<b>$1</b>')
.replace(/\*(.*)\*/gim, '<i>$1</i>')
.replace(/\*\*(.+?)\*\*/gim, '<b>$1</b>')
.replace(/\*(.+?)\*/gim, '<i>$1</i>')
.replace(/!\[(.*?)\]\((.*?)\)/gim, "<img alt='$1' src='$2' />")
.replace(/\[(.*?)\]\((.*?)\)/gim, "<a href='$2' target='_blank' rel='noopener' class='underline'>$1</a>")
.replace(/\n/g, '<br />').trim();

View File

@@ -11,8 +11,8 @@ angular.module("umbraco.filters").filter('simpleMarkdown', function () {
}
return text
.replace(/\*\*(.*)\*\*/gim, '<b>$1</b>')
.replace(/\*(.*)\*/gim, '<i>$1</i>')
.replace(/\*\*(.+?)\*\*/gim, '<b>$1</b>')
.replace(/\*(.+?)\*/gim, '<i>$1</i>')
.replace(/!\[(.*?)\]\((.*?)\)/gim, "<img alt='$1' src='$2' />")
.replace(/\[(.*?)\]\((.*?)\)/gim, "<a href='$2' target='_blank' class='underline'>$1</a>")
.replace(/\n/g, '<br />').trim();