mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
commit
550a5f3e1c
@ -132,7 +132,7 @@ export const makeJsonMetadataForUpdate = (oldJson, meta, tags) => {
|
||||
export const extractMetadata = (body) => {
|
||||
const urlReg = /(\b(https?|ftp):\/\/[A-Z0-9+&@#/%?=~_|!:,.;-]*[-A-Z0-9+&@#/%=~_|])/gim;
|
||||
const userReg = /(^|\s)(@[a-z][-.a-z\d]+[a-z\d])/gim;
|
||||
const imgReg = /(https?:\/\/.*\.(?:png|jpg|jpeg|gif|heic))/gim;
|
||||
const imgReg = /(https?:\/\/.*\.(?:png|jpg|jpeg|gif|heic|webp))/gim;
|
||||
|
||||
const out = {};
|
||||
|
||||
|
@ -64,7 +64,7 @@ export const catchEntryImage = (entry, width = 0, height = 0, format = 'match')
|
||||
};
|
||||
|
||||
export const catchDraftImage = (body, format = 'match', thumbnail = false) => {
|
||||
const imgRegex = /(https?:\/\/.*\.(?:png|jpg|jpeg|gif|heic))/gim;
|
||||
const imgRegex = /(https?:\/\/.*\.(?:png|jpg|jpeg|gif|heic|webp))/gim;
|
||||
format = whatOs === 'android' ? 'webp' : 'match';
|
||||
|
||||
if (body && imgRegex.test(body)) {
|
||||
|
Loading…
Reference in New Issue
Block a user