From 6a5036ab19276b57a44f2d81d7df85a83e872800 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 11 Dec 2016 23:08:46 +0100 Subject: [PATCH] Fix whitespace preservation in status text --- .../components/components/status_content.jsx | 13 ++----------- app/assets/stylesheets/components.scss | 1 + app/assets/stylesheets/stream_entries.scss | 1 + app/lib/formatter.rb | 3 ++- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/components/components/status_content.jsx b/app/assets/javascripts/components/components/status_content.jsx index e75540741..f2c88cee0 100644 --- a/app/assets/javascripts/components/components/status_content.jsx +++ b/app/assets/javascripts/components/components/status_content.jsx @@ -2,8 +2,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import PureRenderMixin from 'react-addons-pure-render-mixin'; import emojify from '../emoji'; -const hideContent = str => $('

').html(str).text().replace(/[^\s]/g, '█'); - const StatusContent = React.createClass({ contextTypes: { @@ -15,12 +13,6 @@ const StatusContent = React.createClass({ onClick: React.PropTypes.func }, - // getInitialState () { - // return { - // visible: false - // }; - // }, - mixins: [PureRenderMixin], componentDidMount () { @@ -67,10 +59,9 @@ const StatusContent = React.createClass({ render () { const { status, onClick } = this.props; - const hidden = false; // (status.get('sensitive') && !this.state.visible); - const content = { __html: hidden ? hideContent(status.get('content')) : emojify(status.get('content')) }; + const content = { __html: emojify(status.get('content')) }; - return