Skip to content

Commit 8355ef2

Browse files
authored
Fix root links
1 parent 8e2adbc commit 8355ef2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Elastic.Markdown/Myst/InlineParsers/DiagnosticLinkInlineParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public override bool Match(InlineProcessor processor, ref StringSlice slice)
149149
if (url.EndsWith(".md"))
150150
link.Url = Path.ChangeExtension(url, ".html");
151151
// rooted links might need the configured path prefix to properly link
152-
var prefix = processor.GetBuildContext().UrlPathPrefix;
152+
var prefix = processor.GetBuildContext().UrlPathPrefix.TrimEnd('/');
153153
if (url.StartsWith("/") && !string.IsNullOrWhiteSpace(prefix))
154154
link.Url = $"{prefix}/{link.Url}";
155155

0 commit comments

Comments
 (0)