diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2016-02-22 17:58:20 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2016-02-23 14:36:04 -0500 |
commit | d6c6f5eaeacd16b3615c855ab7b8aa51f9f46efe (patch) | |
tree | 208100488df57dc89b13494cf671e513906a092b /web/react/components | |
parent | 0031c6fd1a4df621cbecfd2a2b3efe9a40cd49ce (diff) | |
download | chat-d6c6f5eaeacd16b3615c855ab7b8aa51f9f46efe.tar.gz chat-d6c6f5eaeacd16b3615c855ab7b8aa51f9f46efe.tar.bz2 chat-d6c6f5eaeacd16b3615c855ab7b8aa51f9f46efe.zip |
Refactored how links are extracted to remove code blocks and markdown images
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/post_body.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index b187acba3..506b38ce6 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -41,7 +41,7 @@ class PostBody extends React.Component { const linkData = Utils.extractLinks(this.props.post.message); this.state = { - links: linkData.links, + links: linkData, post: this.props.post }; } @@ -86,10 +86,10 @@ class PostBody extends React.Component { componentWillReceiveProps(nextProps) { const linkData = Utils.extractLinks(nextProps.post.message); if (this.props.post.filenames.length === 0 && this.state.links && this.state.links.length > 0) { - this.embed = this.createEmbed(linkData.links[0]); + this.embed = this.createEmbed(linkData[0]); } this.setState({ - links: linkData.links + links: linkData }); } |