mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
Update src/Markdig/Extensions/MediaLinks/MediaLinkExtension.cs
Co-authored-by: Günther Foidl <gue@korporal.at>
This commit is contained in:
@@ -98,11 +98,9 @@ public class MediaLinkExtension : IMarkdownExtension
|
||||
|
||||
private bool TryGuessAudioVideoFile(Uri uri, bool isSchemaRelative, HtmlRenderer renderer, LinkInline linkInline)
|
||||
{
|
||||
string path;
|
||||
if (uri.IsAbsoluteUri)
|
||||
path = uri.GetComponents(UriComponents.Path, UriFormat.Unescaped);
|
||||
else
|
||||
path = uri.ToString();
|
||||
string path = uri.IsAbsoluteUri
|
||||
? uri.GetComponents(UriComponents.Path, UriFormat.Unescaped)
|
||||
: uri.ToString();
|
||||
|
||||
// Otherwise try to detect if we have an audio/video from the file extension
|
||||
var lastDot = path.LastIndexOf('.');
|
||||
|
||||
Reference in New Issue
Block a user