fixed post image and added space for user

This commit is contained in:
u-e 2019-01-23 01:00:08 +03:00
parent 10d8705c33
commit ac7abc0a34
2 changed files with 3 additions and 4 deletions

View File

@ -15,7 +15,6 @@ export default EStyleSheet.create({
fontFamily: '$primaryFont',
},
img: {
left: -16,
// height: 50,
marginTop: 10,
},

View File

@ -21,7 +21,7 @@ const urlRegex = /(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/
const aTagRegex = /(<\s*a[^>]*>(.*?)<\s*[/]\s*a>)/g;
const imgTagRegex = /(<img[^>]*>)/g;
const iframeRegex = /(?:<iframe[^>]*)(?:(?:\/>)|(?:>.*?<\/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}<a class="markdown-author-link" href="${userLower}" data-author="${userLower}">@${user}</a>`;
return `${preceedings}<a class="markdown-author-link" href="${userLower}" data-author="${userLower}"> @${user}</a>`;
});
const replaceTags = input => input.replace(tagsRegex, (tag) => {
@ -236,7 +236,7 @@ const createVimeoIframe = input => input.replace(vimeoRegex, (link) => {
});
const iframeBody = link => `<iframe frameborder='0' allowfullscreen src='${link}'></iframe>`;
const imageBody = link => `<img src="${`https://steemitimages.com/600x0/${link}`}">`;
const imageBody = link => `<center style="text-align: center; align-items: center; justify-content: center;"><img src="${`https://steemitimages.com/1600x0/${link}`}"></center>`;
const gifBody = link => `<img src="${`https://steemitimages.com/0x0/${link}`}">`;
// const handleCodeTag = input => input.replace(codeTagRegex, (tag) => {