diff --git a/app/containers/message/Reply.js b/app/containers/message/Reply.js index 36c55adc7..5fcfe3a7b 100644 --- a/app/containers/message/Reply.js +++ b/app/containers/message/Reply.js @@ -57,6 +57,14 @@ const onPress = (attachment) => { } Linking.openURL(attachment.title_link || attachment.author_link); }; + +// Support +const formatText = text => + text.replace( + new RegExp('(?:<|<)((?:https|http):\\/\\/[^\\|]+)\\|(.+?)(?=>|>)(?:>|>)', 'gm'), + (match, url, title) => `[${ title }](${ url })` + ); + const Reply = ({ attachment, timeFormat }) => { if (!attachment) { return null; @@ -86,7 +94,7 @@ const Reply = ({ attachment, timeFormat }) => { }; const renderText = () => ( - attachment.text ? : null + attachment.text ? : null ); const renderFields = () => {