diff --git a/src/plugins/helpers.ts b/src/plugins/helpers.ts index c7c10f7d4..5d0dab248 100644 --- a/src/plugins/helpers.ts +++ b/src/plugins/helpers.ts @@ -62,10 +62,15 @@ export const camelize = (str: string): string => { } export function formatConsoleMessage(message: string): string { + // 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') + // replace linebreaks with html
message = message.replace('\n// ', '
') message = message.replace(/\r\n|\r|\n/g, '
') return message