";
-
- var idx = 0;
- if (rawContent.IndexOf(enhancedStacktraceStartDelimiter1.AsSpan(), StringComparison.Ordinal) is var enhancedStacktraceStartIdx1 and not -1) idx = enhancedStacktraceStartIdx1;
- if (rawContent.IndexOf(enhancedStacktraceStartDelimiter2.AsSpan(), StringComparison.Ordinal) is var enhancedStacktraceStartIdx2 and not -1) idx = enhancedStacktraceStartIdx2;
-
- if (version < 1000 && idx != -1)
- {
- var enhancedStacktraceEndIdx = rawContent.Slice(idx).IndexOf(enhancedStacktraceEndDelimiter.AsSpan(), StringComparison.Ordinal) - enhancedStacktraceEndDelimiter.Length;
- var enhancedStacktraceRaw = rawContent.Slice(idx, enhancedStacktraceEndIdx).ToString();
- while (GetAllOpenTags(enhancedStacktraceRaw.AsSpan(), span => !span.SequenceEqual(enhancedStacktraceStartDelimiter1.AsSpan()) && !span.SequenceEqual(enhancedStacktraceStartDelimiter2.AsSpan()) && span is not "