mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
fixed jpeg image also steampeak url
This commit is contained in:
parent
4bcf6da2b3
commit
33004e51dc
@ -17,6 +17,7 @@ export default EStyleSheet.create({
|
||||
img: {
|
||||
// height: 50,
|
||||
marginTop: 10,
|
||||
// left: -15,
|
||||
},
|
||||
commentContainer: {
|
||||
paddingHorizontal: 0,
|
||||
|
@ -62,7 +62,7 @@ class PostBody extends PureComponent {
|
||||
url.indexOf('esteem') > -1
|
||||
|| url.indexOf('steemit') > -1
|
||||
|| url.indexOf('busy') > -1
|
||||
|| url.indexOf('steempeak') > -1
|
||||
|| (url.indexOf('steempeak') > -1 && url.indexOf('files') < 0)
|
||||
) {
|
||||
url = url.substring(url.indexOf('@'), url.length);
|
||||
const routeParams = url.indexOf('/') > -1 ? url.split('/') : [url];
|
||||
|
@ -15,7 +15,7 @@ const dTubeRegex = /(https?:\/\/d.tube.#!\/v\/)(\w+)\/(\w+)/g;
|
||||
const authorNameRegex = /(^|[^a-zA-Z0-9_!#$%&*@@\/]|(^|[^a-zA-Z0-9_+~.-\/]))[@@]([a-z][-\.a-z\d]+[a-z\d])/gi;
|
||||
const tagsRegex = /(^|\s|>)(#[-a-z\d]+)/gi;
|
||||
const centerRegex = /(<center>)/g;
|
||||
const imgRegex = /(https?:\/\/.*\.(?:tiff?|jpe?g|gif|png|svg|ico|PNG|GIF|JPG))/g;
|
||||
const imgRegex = /(https?:\/\/.*\.(?:tiff?|jpe?g|gif|png|svg|ico|PNG|GIF|JPG|JPEG))/g;
|
||||
const linkRegex = /[-a-zA-Z0-9@:%+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%+._~#?&//=]*)?/gi;
|
||||
const markdownImageRegex = /!\[[^\]]*\]\((.*?)\s*("(?:.*[^"])")?\s*\)/g;
|
||||
const urlRegex = /(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?/gm;
|
||||
@ -257,8 +257,8 @@ const createVimeoIframe = input => input.replace(vimeoRegex, (link) => {
|
||||
const handleImageLink = input => input.replace(imgRegex, link => imageBody(link));
|
||||
|
||||
const iframeBody = link => `<iframe frameborder='0' allowfullscreen src='${link}'></iframe>`;
|
||||
const imageBody = link => `<center style="text-align: center; align-items: center; justify-content: center;"><img src="${`https://steemitimages.com/600x0/${link}`}"></center>`;
|
||||
const gifBody = link => `<img src="${`https://steemitimages.com/0x0/${link}`}">`;
|
||||
const imageBody = link => `<center style="text-align: center; align-items: center; justify-content: center;"><img src="${`https://steemitimages.com/600x0/${link}`}" /></center>`;
|
||||
const gifBody = link => `<img src="${`https://steemitimages.com/0x0/${link}`}" />`;
|
||||
|
||||
// const handleCodeTag = input => input.replace(codeTagRegex, (tag) => {
|
||||
// const stringsRegex = /(?<=>)(.*)(?=<)/g;
|
||||
|
Loading…
Reference in New Issue
Block a user