From ac7abc0a34b6948dfdac6d13606d0800c8c25a8d Mon Sep 17 00:00:00 2001 From: u-e Date: Wed, 23 Jan 2019 01:00:08 +0300 Subject: [PATCH] fixed post image and added space for user --- src/components/postElements/body/view/postBodyStyles.js | 1 - src/utils/markdownToHtml.js | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/postElements/body/view/postBodyStyles.js b/src/components/postElements/body/view/postBodyStyles.js index b6f6a5f3c..4bf276507 100644 --- a/src/components/postElements/body/view/postBodyStyles.js +++ b/src/components/postElements/body/view/postBodyStyles.js @@ -15,7 +15,6 @@ export default EStyleSheet.create({ fontFamily: '$primaryFont', }, img: { - left: -16, // height: 50, marginTop: 10, }, diff --git a/src/utils/markdownToHtml.js b/src/utils/markdownToHtml.js index 77457b94f..d2df1adbd 100644 --- a/src/utils/markdownToHtml.js +++ b/src/utils/markdownToHtml.js @@ -21,7 +21,7 @@ const urlRegex = /(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/ const aTagRegex = /(<\s*a[^>]*>(.*?)<\s*[/]\s*a>)/g; const imgTagRegex = /(]*>)/g; const iframeRegex = /(?:]*)(?:(?:\/>)|(?:>.*?<\/iframe>))/g; -// const markdownLinkRegex = /(?:__|[])|\[(.*?)\]\(.*?\)/g; +//const markdownLinkRegex = /(?:__|[])|\[(.*?)\]\(.*?\)/g; export const markDown2Html = (input) => { if (!input) { @@ -89,7 +89,7 @@ export const markDown2Html = (input) => { const replaceAuthorNames = input => input.replace(authorNameRegex, (match, preceeding1, preceeding2, user) => { const userLower = user.toLowerCase(); const preceedings = (preceeding1 || '') + (preceeding2 || ''); - return `${preceedings}@${user}`; + return `${preceedings} @${user}`; }); const replaceTags = input => input.replace(tagsRegex, (tag) => { @@ -236,7 +236,7 @@ const createVimeoIframe = input => input.replace(vimeoRegex, (link) => { }); const iframeBody = link => ``; -const imageBody = link => ``; +const imageBody = link => `
`; const gifBody = link => ``; // const handleCodeTag = input => input.replace(codeTagRegex, (tag) => {