Skip to content

Commit 5c7ce53

Browse files
authored
Merge pull request #7 from jbidad/master
feature: add pre tag TelegramFormatter
2 parents 3aac685 + 5140330 commit 5c7ce53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/TelegramFormatter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ private function getMessageForException($exception)
144144
}
145145
}
146146

147-
$message .= PHP_EOL . '<b>Request Inputs:</b> ' . json_encode($request->except('password', 'password_confirmation'), JSON_UNESCAPED_UNICODE);
147+
$message .= PHP_EOL . '<b>Request Inputs:</b> <pre>' . str_replace(
148+
["\n", " "], ['',''], json_encode($request->except('password', 'password_confirmation'), JSON_UNESCAPED_UNICODE)
149+
) . '</pre>';
148150

149151
$message .= PHP_EOL . PHP_EOL . '<b>Trace: </b> ' . PHP_EOL . '<b> => </b> => ' . substr($exception->getTraceAsString(), 0, 1000) . ' ...';
150152

0 commit comments

Comments
 (0)