mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-10 16:58:55 -05:00
Limit error message header to first line
This commit is contained in:
committed by
Henning Dieterichs
parent
41b2ab0607
commit
cefcfa09a9
@@ -424,7 +424,8 @@ function generateMarkdown(
|
||||
for (let i = 0; i < errored.length; i++) {
|
||||
const entry = errored[i];
|
||||
const open = i < EXPAND_FIRST_N ? ' open' : '';
|
||||
const header = `<details${open}><summary><code>${entry.fixtureId}</code> — ${escapeMarkdown(entry.errorMessage)}</summary>`;
|
||||
const headerMessage = entry.errorMessage.split('\n').map(l => l.trim()).find(l => l.length > 0) ?? entry.errorMessage;
|
||||
const header = `<details${open}><summary><code>${entry.fixtureId}</code> — ${escapeMarkdown(headerMessage)}</summary>`;
|
||||
const fullStack = entry.errorStack ?? entry.errorMessage;
|
||||
const fullBlock = `${header}\n\n\`\`\`\n${fullStack}\n\`\`\`\n\n</details>\n`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user