diff --git a/src/Markdig.Tests/TestMediaLinks.cs b/src/Markdig.Tests/TestMediaLinks.cs index 69fff8a5..90d7f6a4 100644 --- a/src/Markdig.Tests/TestMediaLinks.cs +++ b/src/Markdig.Tests/TestMediaLinks.cs @@ -25,6 +25,7 @@ private MarkdownPipeline GetPipelineWithBootstrap(MediaOptions options = null) [Test] [TestCase("![static mp4](https://sample.com/video.mp4)", "
\n")] [TestCase("![static mp4](//sample.com/video.mp4)", "\n")] + [TestCase(@"![youtube short](https://www.youtube.com/shorts/6BUptHVuvyI?feature=share)", "\n")] [TestCase(@"![youtube.com](https://www.youtube.com/watch?v=mswPy5bt3TQ)", "\n")] [TestCase("![yandex.ru](https://music.yandex.ru/album/411845/track/4402274)", "\n")] [TestCase("![vimeo](https://vimeo.com/8607834)", "\n")] @@ -33,7 +34,7 @@ private MarkdownPipeline GetPipelineWithBootstrap(MediaOptions options = null) public void TestBuiltInHosts(string markdown, string expected) { string html = Markdown.ToHtml(markdown, GetPipeline()); - Assert.AreEqual(html, expected); + Assert.AreEqual(expected, html); } [TestCase("![static video relative path](./video.mp4)", @@ -43,7 +44,7 @@ public void TestBuiltInHosts(string markdown, string expected) public void TestBuiltInHostsWithRelativePaths(string markdown, string expected) { string html = Markdown.ToHtml(markdown, GetPipeline()); - Assert.AreEqual(html, expected); + Assert.AreEqual(expected, html); } private class TestHostProvider : IHostProvider diff --git a/src/Markdig/Extensions/MediaLinks/HostProviderBuilder.cs b/src/Markdig/Extensions/MediaLinks/HostProviderBuilder.cs index 419f38d2..38377ac8 100644 --- a/src/Markdig/Extensions/MediaLinks/HostProviderBuilder.cs +++ b/src/Markdig/Extensions/MediaLinks/HostProviderBuilder.cs @@ -58,6 +58,7 @@ public static IHostProvider Create(string hostPrefix, Func