mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-12-01 04:34:15 +01:00
Fix some SonarCloud issues (#955)
* Fixed some SonarCloud issues
* if (value.Contains('\n'))
This commit is contained in:
1 parent
f6e35cbe2d
commit
5d0bf6f4e1
5 files changed
+176
-167
No files matched your search
@@ -138,7 +138,7 @@ internal static class CSharpFormatter
|
||||
return "\"\"";
|
||||
}
|
||||
|
||||
if (value.Contains("\n"))
|
||||
if (value.Contains('\n'))
|
||||
{
|
||||
var escapedValue = value?.Replace("\"", "\"\"") ?? string.Empty;
|
||||
return $"@\"{escapedValue}\"";
|
||||
|
||||
Reference in new issue
Block a user