@@ -124,7 +124,7 @@ function generateTestCaseRow(testCase: MatlabTestCase): string {
124124 ? testCase . diagnostics . map ( diagnostic =>
125125 `<details>` +
126126 `<summary>` + diagnostic . event + `</summary>` +
127- `<p style="white-space: pre-wrap;">` + diagnostic . report + `</p>` +
127+ `<p style="white-space: pre-wrap;">` + formatDiagnosticReport ( diagnostic . report ) + `</p>` +
128128 `<pre style="white-space: pre-wrap;">` + diagnostic . report + `</pre>` +
129129 `</details>`
130130 ) . join ( '' )
@@ -137,25 +137,25 @@ function generateTestCaseRow(testCase: MatlabTestCase): string {
137137 `</tr>` ;
138138}
139139
140- // function formatDiagnosticReport(report: string): string {
141- // return report
142- // // HTML special characters
143- // .replace(/&/g, '&')
144- // .replace(/</g, '<')
145- // .replace(/>/g, '>')
146- // .replace(/"/g, '"')
147- // .replace(/'/g, ''')
148- // .replace(/`/g, '`')
149- // // Path separators for all OS
150- // .replace(/\\/g, '\\\\') // Windows backslash
151- // .replace(/\//g, '/') // Unix forward slash
152- // // Preserve MATLAB formatting
153- // .replace(/\r\n/g, '\n') // Windows line endings
154- // .replace(/\r/g, '\n') // Mac old-style line endings
155- // .replace(/\t/g, ' ') // Tabs to spaces
156- // .replace(/\n\n/g, '<br><br>')
157- // .trim();
158- // }
140+ function formatDiagnosticReport ( report : string ) : string {
141+ return report
142+ // HTML special characters
143+ // .replace(/&/g, '&')
144+ // .replace(/</g, '<')
145+ // .replace(/>/g, '>')
146+ // .replace(/"/g, '"')
147+ // .replace(/'/g, ''')
148+ // .replace(/`/g, '`')
149+ // // Path separators for all OS
150+ // .replace(/\\/g, '\\\\') // Windows backslash
151+ // .replace(/\//g, '/') // Unix forward slash
152+ // // Preserve MATLAB formatting
153+ // .replace(/\r\n/g, '\n') // Windows line endings
154+ // .replace(/\r/g, '\n') // Mac old-style line endings
155+ // .replace(/\t/g, ' ') // Tabs to spaces
156+ . replace ( / \n \n / g, '<br><br>' )
157+ . trim ( ) ;
158+ }
159159
160160function getStatusEmoji ( status : MatlabTestStatus ) : string {
161161 switch ( status ) {
0 commit comments