From 371522681abf6c13574a170c448246e3098c5980 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 16 Oct 2019 16:09:52 -0700 Subject: [PATCH] Use pre tags for view source to preserve newlines. - Fixes #299 --- ui/src/components/comment-node.tsx | 2 +- ui/src/components/post-listing.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 2cb556023..ce4bb5108 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 9db7cf4b6..4468d188e 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}
    :
    }