Skip to content

Commit 8386e11

Browse files
theletterfMpdreamz
andauthored
Update src/Elastic.Markdown/Myst/Renderers/LlmMarkdown/LlmBlockRenderers.cs
Co-authored-by: Martijn Laarman <[email protected]>
1 parent 73108e3 commit 8386e11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Elastic.Markdown/Myst/Renderers/LlmMarkdown/LlmBlockRenderers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ private static bool HasFileExtension(string path)
128128
if (Uri.TryCreate(path, UriKind.RelativeOrAbsolute, out var uri))
129129
{
130130
// Get the path component without query/fragment
131-
var pathOnly = uri.IsAbsoluteUri ? uri.AbsolutePath : uri.OriginalString.Split('?', '#')[0];
131+
var pathOnly = uri.GetLeftPart(UriPartial.Path);
132132
var ext = Path.GetExtension(pathOnly);
133133
return !string.IsNullOrEmpty(ext);
134134
}

0 commit comments

Comments
 (0)