Skip to content

Commit 9ec159c

Browse files
Update test/OrchardCoreContrib.PoExtractor.Tests/PluginTests.cs
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
1 parent ffac438 commit 9ec159c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/OrchardCoreContrib.PoExtractor.Tests/PluginTests.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,12 @@ public async Task ProcessPluginsBasicJsonLocalizationProcessor()
6464
private static string CleanupSpaces(string input)
6565
{
6666
// Trim leading whitespaces.
67-
input = Regex.Replace(input.Trim(), @"^\s+", string.Empty, RegexOptions.Multiline);
67+
input = TrimLeadingSpacesRegex().Replace(input.Trim(), string.Empty);
6868

6969
// Make the path OS-specific, so the test works on Windows as well.
7070
return input.Replace('/', Path.DirectorySeparatorChar);
7171
}
72+
73+
[GeneratedRegex(@"^\s+", RegexOptions.Multiline)]
74+
private static partial Regex TrimLeadingSpacesRegex();
7275
}

0 commit comments

Comments
 (0)