Skip to content

Commit e15aa46

Browse files
committed
add whitespace
1 parent 19fcb17 commit e15aa46

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

src/testResultsSummary.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function generateTestCaseRow(testCase: MatlabTestCase): string {
121121
? testCase.diagnostics.map(diagnostic =>
122122
`<details>` +
123123
`<summary>` + diagnostic.event + `</summary>` +
124-
`<pre>` + diagnostic.report + `</pre>` +
124+
`<pre style="white-space: pre-line;">` + diagnostic.report + `</pre>` +
125125
`</details>`
126126
).join('')
127127
: '';
@@ -133,25 +133,25 @@ function generateTestCaseRow(testCase: MatlabTestCase): string {
133133
`</tr>`;
134134
}
135135

136-
function formatDiagnosticReport(report: string): string {
137-
return report
138-
// HTML special characters
139-
.replace(/&/g, '&amp;')
140-
.replace(/</g, '&lt;')
141-
.replace(/>/g, '&gt;')
142-
.replace(/"/g, '&quot;')
143-
.replace(/'/g, '&#039;')
144-
.replace(/`/g, '&#096;')
145-
// Path separators for all OS
146-
.replace(/\\/g, '\\\\') // Windows backslash
147-
.replace(/\//g, '/') // Unix forward slash
148-
// Preserve MATLAB formatting
149-
.replace(/\r\n/g, '\n') // Windows line endings
150-
.replace(/\r/g, '\n') // Mac old-style line endings
151-
.replace(/\t/g, ' ') // Tabs to spaces
152-
.replace(/\n\n/g, '<br><br>')
153-
.trim();
154-
}
136+
// function formatDiagnosticReport(report: string): string {
137+
// return report
138+
// // HTML special characters
139+
// .replace(/&/g, '&amp;')
140+
// .replace(/</g, '&lt;')
141+
// .replace(/>/g, '&gt;')
142+
// .replace(/"/g, '&quot;')
143+
// .replace(/'/g, '&#039;')
144+
// .replace(/`/g, '&#096;')
145+
// // Path separators for all OS
146+
// .replace(/\\/g, '\\\\') // Windows backslash
147+
// .replace(/\//g, '/') // Unix forward slash
148+
// // Preserve MATLAB formatting
149+
// .replace(/\r\n/g, '\n') // Windows line endings
150+
// .replace(/\r/g, '\n') // Mac old-style line endings
151+
// .replace(/\t/g, ' ') // Tabs to spaces
152+
// .replace(/\n\n/g, '<br><br>')
153+
// .trim();
154+
// }
155155

156156
function getStatusEmoji(status: MatlabTestStatus): string {
157157
switch (status) {

0 commit comments

Comments
 (0)