webdojo: preserve whitespace in output

These aren't <pre>, so need explicit styling to preserve leading,
trailing, and "gratuitous" whitespace.
This commit is contained in:
Fang 2020-09-25 01:18:52 +02:00
parent c3991676c2
commit 41940b56fd
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -15,7 +15,7 @@ export class History extends Component {
{this.props.commandLog.map((text, index) => {
return (
<p className="mono" key={index}
style={{ overflowWrap: 'break-word' }}
style={{ overflowWrap: 'break-word', whiteSpace: 'pre' }}
>
{text}
</p>