Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
if (url.EndsWith(".md"))
link.Url = Path.ChangeExtension(url, ".html");
// rooted links might need the configured path prefix to properly link
var prefix = processor.GetBuildContext().UrlPathPrefix;
var prefix = processor.GetBuildContext().UrlPathPrefix.TrimEnd('/');

Check failure on line 152 in src/Elastic.Markdown/Myst/InlineParsers/DiagnosticLinkInlineParser.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.

Check failure on line 152 in src/Elastic.Markdown/Myst/InlineParsers/DiagnosticLinkInlineParser.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
if (url.StartsWith("/") && !string.IsNullOrWhiteSpace(prefix))
link.Url = $"{prefix}/{link.Url}";

Expand Down
Loading