-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing constant for AssemblyDescriptionAttribute
Fixes #234
- Loading branch information
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
|
||
public static class Extensions | ||
{ | ||
public static string ReplaceLineEndings(this string input) => ReplaceLineEndings(input, Environment.NewLine); | ||
|
||
public static string ReplaceLineEndings(this string input, string replacementText) | ||
{ | ||
#if NET6_0_OR_GREATER | ||
return input.ReplaceLineEndings(replacementText); | ||
#else | ||
// First normalize to LF | ||
var lineFeedInput = input | ||
.Replace("\r\n", "\n") | ||
.Replace("\r", "\n") | ||
.Replace("\f", "\n") | ||
.Replace("\x0085", "\n") | ||
.Replace("\x2028", "\n") | ||
.Replace("\x2029", "\n"); | ||
|
||
// Then normalize to the replacement text | ||
return lineFeedInput.Replace("\n", replacementText); | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters