diff --git a/src/plugins/helpers.ts b/src/plugins/helpers.ts index 7f4c89b31..0641ec209 100644 --- a/src/plugins/helpers.ts +++ b/src/plugins/helpers.ts @@ -62,13 +62,20 @@ export const camelize = (str: string): string => { } export function formatConsoleMessage(message: string): string { - message = message.replace(/!! /g, '') - message = message.replace(/\/\/ /g, '') + // remove !! at error msg start + message = message.replace(/^!! /g, '') + // remove !! after \n new line + message = message.replace(/\n!! /g, '\n') + // remove // at command msg start + message = message.replace(/^\/\/ /g, '') + // remove // at \n new line + message = message.replace(/\n\/\/ /g, '\n') + // remove echo + message = message.replace(/^echo:/g, '') + message = message.replace(/^echo: /g, '') + // replace linebreaks with html
message = message.replace('\n// ', '
') message = message.replace(/\r\n|\r|\n/g, '
') - //message = message.replaceAll('
', '
') - //return message.split('
'); - return message }