Skip to content

Commit

Permalink
Exclude empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Dec 22, 2023
1 parent 0629669 commit ef58be3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.55" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.56" />
<PackageReference Include="Polyfill" Version="1.34.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
<PackageReference Include="System.Memory" Version="4.5.5" />
Expand Down
20 changes: 10 additions & 10 deletions src/BUTR.CrashReport.Bannerlord.Source/CrashReportHtmlRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,13 @@ private static string GetEnhancedStacktraceHtml(CrashReportModel crashReport)
.Append("Approximate IL Offset: ").Append(stacktrace.ILOffset is not null ? $"{stacktrace.ILOffset:X4}" : "UNKNOWN").Append("<br/>")
.Append("Native Offset: ").Append(stacktrace.NativeOffset is not null ? $"{stacktrace.NativeOffset:X4}" : "UNKNOWN")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id1}\")'>+ IL:</a><div id='{id1}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, stacktrace.ExecutingMethod.ILInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(stacktrace.ExecutingMethod.ILInstructions.Count > 0, Environment.NewLine, stacktrace.ExecutingMethod.ILInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id2}\")'>+ IL with C#:</a><div id='{id2}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, stacktrace.ExecutingMethod.CSharpILMixedInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(stacktrace.ExecutingMethod.CSharpILMixedInstructions.Count > 0, Environment.NewLine, stacktrace.ExecutingMethod.CSharpILMixedInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id3}\")'>+ C#:</a><div id='{id3}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, stacktrace.ExecutingMethod.CSharpInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(stacktrace.ExecutingMethod.CSharpInstructions.Count > 0, Environment.NewLine, stacktrace.ExecutingMethod.CSharpInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id4}\")'>+ Native:</a><div id='{id4}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, stacktrace.ExecutingMethod.NativeInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(stacktrace.ExecutingMethod.NativeInstructions.Count > 0, Environment.NewLine, stacktrace.ExecutingMethod.NativeInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append("</li>")
.Append("</ul>");

Expand All @@ -546,11 +546,11 @@ private static string GetEnhancedStacktraceHtml(CrashReportModel crashReport)
.AppendIf(moduleId != "UNKNOWN", sb => sb.Append("Module Id: ").Append("<b><a href='javascript:;' onclick='scrollToElement(\"").Append(moduleId).Append("\")'>").Append(moduleId).Append("</a></b>").Append("<br/>"))
.Append("Method: ").Append(method.MethodFullDescription.EscapeGenerics()).Append("<br/>")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id01}\")'>+ IL:</a><div id='{id01}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, method.ILInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(method.ILInstructions.Count > 0, Environment.NewLine, method.ILInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id02}\")'>+ IL with C#:</a><div id='{id02}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, method.CSharpILMixedInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(method.CSharpILMixedInstructions.Count > 0, Environment.NewLine, method.CSharpILMixedInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id03}\")'>+ C#:</a><div id='{id03}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, method.CSharpInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(method.CSharpInstructions.Count > 0, Environment.NewLine, method.CSharpInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append("</li>");
}
sb.Append("</ul>");
Expand All @@ -568,11 +568,11 @@ private static string GetEnhancedStacktraceHtml(CrashReportModel crashReport)
.AppendIf(moduleId2 != "UNKNOWN", sb => sb.Append("Module Id: ").Append("<b><a href='javascript:;' onclick='scrollToElement(\"").Append(moduleId2).Append("\")'>").Append(moduleId2).Append("</a></b>").Append("<br/>"))
.Append("Method: ").Append(stacktrace.OriginalMethod.MethodFullDescription.EscapeGenerics()).Append("<br/>")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id01}\")'>+ IL:</a><div id='{id01}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, stacktrace.OriginalMethod.ILInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(stacktrace.OriginalMethod.ILInstructions.Count > 0, Environment.NewLine, stacktrace.OriginalMethod.ILInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id02}\")'>+ IL with C#:</a><div id='{id02}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, stacktrace.OriginalMethod.CSharpILMixedInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(stacktrace.OriginalMethod.CSharpILMixedInstructions.Count > 0, Environment.NewLine, stacktrace.OriginalMethod.CSharpILMixedInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append($"<div><a href='javascript:;' class='headers' onclick='showHideById(this, \"{id03}\")'>+ C#:</a><div id='{id03}' class='headers-container'><pre>")
.AppendJoin(Environment.NewLine, stacktrace.OriginalMethod.CSharpInstructions.Select(x => x.EscapeGenerics())).Append("</pre></div></div>")
.AppendJoinIf(stacktrace.OriginalMethod.CSharpInstructions.Count > 0, Environment.NewLine, stacktrace.OriginalMethod.CSharpInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("</pre></div></div>")
.Append("</li>")
.Append("</ul>");
}
Expand Down

0 comments on commit ef58be3

Please sign in to comment.