Added auto links and media support to markdown

This commit is contained in:
Mia Rose Winter 2024-02-02 17:35:30 +01:00
parent ca1a5998c4
commit 736f261459
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E

View file

@ -1,4 +1,5 @@
using Markdig;
using Markdig.Extensions.MediaLinks;
using Microsoft.AspNetCore.Components;
using Wave.Data;
@ -12,6 +13,11 @@ public static class MarkdownUtilities {
.UseListExtras()
.UseSoftlineBreakAsHardlineBreak()
.UseSmartyPants()
.UseAutoLinks()
.UseMediaLinks(new MediaOptions {
AddControlsProperty = true,
Class = "max-w-full"
})
.DisableHtml()
.Build();
return Markdown.ToHtml(markdown, pipeline);