Skip to content

Commit

Permalink
Wrap error message/stack trace content in <pre> (#2419)
Browse files Browse the repository at this point in the history
* Wrap error message/stack trace content in <pre>

* Wrap lines in pre tags
  • Loading branch information
RikkiGibson committed Apr 29, 2020
1 parent 7b08d8d commit df61f73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Microsoft.TestPlatform.Extensions.HtmlLogger/Html.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
margin-top: 15px;
margin-bottom:10px;
}
pre {
white-space: pre-wrap;
}
.summary {font-family:monospace;
display: -webkit-flex; /* Safari */
-webkit-flex-wrap: wrap; /* Safari 6.1+ */
Expand Down Expand Up @@ -180,11 +183,11 @@
</xsl:template>

<xsl:template match = "tp:ErrorMessage">
Error: <span class="error-message"><xsl:value-of select = "." /></span><br />
Error: <span class="error-message"><pre><xsl:value-of select = "." /></pre></span><br />
</xsl:template>

<xsl:template match = "tp:ErrorStackTrace">
Stack trace: <span class="error-stack-trace"><xsl:value-of select = "." /></span><br />
Stack trace: <span class="error-stack-trace"><pre><xsl:value-of select = "." /></pre></span><br />
</xsl:template>

<xsl:template match = "tp:FailedTests">
Expand Down

0 comments on commit df61f73

Please sign in to comment.