From b5ea678b1acad0ef1784b42f727fbb0066a84930 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Nov 2025 12:12:34 +0000 Subject: [PATCH 1/2] Initial plan From 2827d75e50bec866b9e09433c8bf48134432c53d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Nov 2025 12:21:52 +0000 Subject: [PATCH 2/2] Fix string formatting issues in DiagnosticLinkInlineParser Co-authored-by: reakaleek <16325797+reakaleek@users.noreply.github.com> --- .../Myst/InlineParsers/DiagnosticLinkInlineParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Elastic.Markdown/Myst/InlineParsers/DiagnosticLinkInlineParser.cs b/src/Elastic.Markdown/Myst/InlineParsers/DiagnosticLinkInlineParser.cs index 3d41d599c..f67259b3a 100644 --- a/src/Elastic.Markdown/Myst/InlineParsers/DiagnosticLinkInlineParser.cs +++ b/src/Elastic.Markdown/Myst/InlineParsers/DiagnosticLinkInlineParser.cs @@ -272,7 +272,7 @@ private static void ValidateInternalUrl(InlineProcessor processor, string url, s processor.EmitWarning(link, $"Local file `{url}` has a redirect, please update this reference to: {name}"); } else - processor.EmitError(link, $"`{url}` does not exist. If it was recently removed add a redirect. resolved to `{pathOnDisk}"); + processor.EmitError(link, $"`{url}` does not exist. If it was recently removed add a redirect. resolved to `{pathOnDisk}`"); } } @@ -340,7 +340,7 @@ private static void UpdateLinkUrl(LinkInline link, MarkdownFile? linkMarkdown, s { newUrl = newUrl.EndsWith($"{Path.DirectorySeparatorChar}index.md") ? newUrl.Remove(newUrl.LastIndexOf("index.md", StringComparison.Ordinal), "index.md".Length) - : newUrl.Remove(url.LastIndexOf(".md", StringComparison.Ordinal), ".md".Length); + : newUrl.Remove(newUrl.LastIndexOf(".md", StringComparison.Ordinal), ".md".Length); } // TODO this is hardcoded should be part of extension system