From 1f910f616a60e8708f37c982ea6e1f66da89dc9d Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Tue, 15 Jul 2025 14:00:59 -0700 Subject: [PATCH 1/3] Remove extra newline from APIDiff TOC --- .../ApiDiff/Microsoft.DotNet.ApiDiff/FileOutputDiffGenerator.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff/FileOutputDiffGenerator.cs b/src/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff/FileOutputDiffGenerator.cs index ae5ef0367769..db26a6154074 100644 --- a/src/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff/FileOutputDiffGenerator.cs +++ b/src/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff/FileOutputDiffGenerator.cs @@ -155,8 +155,6 @@ public async Task RunAsync(CancellationToken cancellationToken) _log.LogMessage($"Wrote '{filePath}'."); } - tableOfContents.AppendLine(); - string tableOfContentsFilePath = Path.Combine(_outputFolderPath, $"{_tableOfContentsTitle}.md"); if (_writeToDisk) From ef772e5a738305caa037c52bf8a7b7a0318cb982 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Wed, 16 Jul 2025 08:44:37 -0700 Subject: [PATCH 2/3] Update tests to remove extra newline --- test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs b/test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs index 24e96ea62a24..4f9a002ea7ef 100644 --- a/test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs +++ b/test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs @@ -25,7 +25,6 @@ Lines preceded by a '+' are additions and a '-' indicates removal. * [{DefaultAssemblyName}]({DefaultTableOfContentsTitle}_{DefaultAssemblyName}.md) - """; private const string ExpectedEmptyTableOfContents = $""" @@ -35,7 +34,6 @@ API listing follows standard diff formatting. Lines preceded by a '+' are additions and a '-' indicates removal. - """; private const string BeforeCode = """ From df2e078c7327e13caeb8c32745118f8a0e073b57 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Wed, 16 Jul 2025 09:17:05 -0700 Subject: [PATCH 3/3] Fix one more newline --- test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs b/test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs index 4f9a002ea7ef..97af160dbaad 100644 --- a/test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs +++ b/test/Microsoft.DotNet.ApiDiff.Tests/Diff.Disk.Tests.cs @@ -237,7 +237,6 @@ Lines preceded by a '+' are additions and a '-' indicates removal. * [Assembly1]({DefaultTableOfContentsTitle}_Assembly1.md) * [Assembly2]({DefaultTableOfContentsTitle}_Assembly2.md) - "; using TempDirectory inputFolderPath = new();