Skip to content

Commit

Permalink
Fix root links pt2 (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
reakaleek authored Jan 31, 2025
1 parent c781dcd commit fdeeee7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public override bool Match(InlineProcessor processor, ref StringSlice slice)
// rooted links might need the configured path prefix to properly link
var prefix = processor.GetBuildContext().UrlPathPrefix;
if (url.StartsWith("/") && !string.IsNullOrWhiteSpace(prefix))
link.Url = $"{prefix.TrimEnd('/')}/{link.Url}";
link.Url = $"{prefix.TrimEnd('/')}{link.Url}";

if (!string.IsNullOrEmpty(anchor))
link.Url += $"#{anchor}";
Expand Down

0 comments on commit fdeeee7

Please sign in to comment.