From d30c8414cfc96514f373890aa05cca2484448640 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Thu, 28 Mar 2024 23:07:03 +0200 Subject: [PATCH] Clean up --- GitHubActionsTestLogger/Utils/StackFrame.cs | 54 ++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/GitHubActionsTestLogger/Utils/StackFrame.cs b/GitHubActionsTestLogger/Utils/StackFrame.cs index dda5f7c..c155a36 100644 --- a/GitHubActionsTestLogger/Utils/StackFrame.cs +++ b/GitHubActionsTestLogger/Utils/StackFrame.cs @@ -24,33 +24,33 @@ internal partial class StackFrame private static readonly Regex Pattern = new( $$""" - ^ - {{Space}}* - \w+ {{Space}}+ - (? - (? {{NotSpace}}+ ) \. - (? {{NotSpace}}+? ) {{Space}}* - (? \( ( {{Space}}* \) - | (? .+?) {{Space}}+ (? .+?) - (, {{Space}}* (? .+?) {{Space}}+ (? .+?) )* \) ) ) - ( {{Space}}+ - ( # Microsoft .NET stack traces - \w+ {{Space}}+ - (? ( [a-z] \: # Windows rooted path starting with a drive letter - | / ) # Unix rooted path starting with a forward-slash - .+? ) - \: \w+ {{Space}}+ - (? [0-9]+ ) \p{P}? - | # Mono stack traces - \[0x[0-9a-f]+\] {{Space}}+ \w+ {{Space}}+ - <(? [^>]+ )> - :(? [0-9]+ ) - ) - )? - ) - \s* - $ - """, + ^ + {{Space}}* + \w+ {{Space}}+ + (? + (? {{NotSpace}}+ ) \. + (? {{NotSpace}}+? ) {{Space}}* + (? \( ( {{Space}}* \) + | (? .+?) {{Space}}+ (? .+?) + (, {{Space}}* (? .+?) {{Space}}+ (? .+?) )* \) ) ) + ( {{Space}}+ + ( # Microsoft .NET stack traces + \w+ {{Space}}+ + (? ( [a-z] \: # Windows rooted path starting with a drive letter + | / ) # Unix rooted path starting with a forward-slash + .+? ) + \: \w+ {{Space}}+ + (? [0-9]+ ) \p{P}? + | # Mono stack traces + \[0x[0-9a-f]+\] {{Space}}+ \w+ {{Space}}+ + <(? [^>]+ )> + :(? [0-9]+ ) + ) + )? + ) + \s* + $ + """, RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.ExplicitCapture