Skip to content

Commit

Permalink
Fixed an issue where bold markdown would not work inside a property d…
Browse files Browse the repository at this point in the history
…escription
  • Loading branch information
Dan Lister authored and iOvergaard committed Dec 13, 2024
1 parent 3233b24 commit 4ef5064
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4ef5064

Please sign in to comment.