Added an analyzer which keeps line breaks LF on every system (#1193)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-11 19:30:00 +01:00
1 parent b1c1f13993
commit 65d50de033
96 files changed
+741 -393

No files matched your search

+2 -2
View File
@@ -99,7 +99,7 @@ public static class Markdown
if (document.Descendants<FencedCodeBlock>().LastOrDefault() is not { ClosingFencedCharCount: 0 } openFence)
return markdownText;
return $"{markdownText}{Environment.NewLine}{new string(openFence.FencedChar, openFence.OpeningFencedCharCount)}";
return $"{markdownText}\n{new string(openFence.FencedChar, openFence.OpeningFencedCharCount)}";
}
/// <summary>Puts a block of Markdown below a Markdown text, such as its sources or a notice.</summary>
@@ -118,7 +118,7 @@ public static class Markdown
// The blank line is not cosmetic: it ends a paragraph, a list, a table, or a block quote, so
// that the block stands on its own instead of being pulled into the last block of the text.
//
return $"{CloseOpenCodeFence(markdownText)}{Environment.NewLine}{Environment.NewLine}{block}";
return $"{CloseOpenCodeFence(markdownText)}\n\n{block}";
}
public static string RemoveSharedIndentation(string value)