From: Dessalines Date: Wed, 16 Oct 2019 23:09:52 +0000 (-0700) Subject: Use pre tags for view source to preserve newlines. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/save/%22%7B%7D/static/%7Blink%7D?a=commitdiff_plain;h=344ba4dfaef541a48f459d6fd92f417a128d1190;p=lemmy.git Use pre tags for view source to preserve newlines. - Fixes #299 --- diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 2cb55602..ce4bb510 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -112,7 +112,7 @@ export class CommentNode extends Component { {this.state.showEdit && } {!this.state.showEdit && !this.state.collapsed &&
- {this.state.viewSource ?
{this.commentUnlessRemoved}
: + {this.state.viewSource ?
{this.commentUnlessRemoved}
:
}
    diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index 9db7cf4b..4468d188 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -309,7 +309,7 @@ export class PostListing extends Component { } {this.props.showBody && post.body && <> - {this.state.viewSource ?
    {post.body}
    : + {this.state.viewSource ?
    {post.body}
    :
    }