mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
Wrap long lines in compiler error
This way we don't overflow the toast.
This commit is contained in:
@@ -316,7 +316,11 @@ function* dismissCompilerError(): Generator {
|
||||
|
||||
function* showCompilerError(action: MpyDidFailToCompileAction): Generator {
|
||||
yield* showSingleton(Level.Error, MessageId.MpyError, {
|
||||
errorMessage: React.createElement('pre', undefined, action.err.join('\n')),
|
||||
errorMessage: React.createElement(
|
||||
'pre',
|
||||
{ style: { whiteSpace: 'pre-wrap', wordBreak: 'keep-all' } },
|
||||
action.err.join('\n'),
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user