diff --git a/src/ReportPortal.Extensions.SourceBack/SourceBackFormatter.cs b/src/ReportPortal.Extensions.SourceBack/SourceBackFormatter.cs index 96eb64f..43fcf25 100644 --- a/src/ReportPortal.Extensions.SourceBack/SourceBackFormatter.cs +++ b/src/ReportPortal.Extensions.SourceBack/SourceBackFormatter.cs @@ -40,8 +40,10 @@ public bool FormatLog(CreateLogItemRequest logRequest) { _traceLogger.Info($"Parsing exception stacktrace in log message with {logRequest.Level} level..."); - foreach (var line in logRequest.Text.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)) + foreach (var line in logRequest.Text.Split(new string[] { Environment.NewLine, "\n" }, StringSplitOptions.None)) { + _traceLogger.Verbose("Parsing line as stacktrace frame:" + Environment.NewLine + line); + var lineWithoutMarkdown = line.Replace("`", @"\`").Replace("__", @"\__"); var match = Regex.Match(line, @"\s+\w+\s.*\s\w+\s(.*):\w+\s(\d+)");