Authored by lea guo

emoji test

/* eslint-disable indent */
import { get, first } from 'lodash';
function _version2num(version) {
... ... @@ -38,6 +39,16 @@ function handleProtocol(url) {
return url.join('//');
}
const filterEmoji = (text) => {
const ranges = [
'\ud83c[\udf00-\udfff]',
'\ud83d[\udc00-\ude4f]',
'\ud83d[\ude80-\udeff]'
];
return text.replace(new RegExp(ranges.join('|'), 'g'), '');
};
// eslint-disable-next-line no-unused-vars
const getDetailShareData = (article, app_version = '6.9.11') => {
let shareImage = '';
... ... @@ -79,10 +90,10 @@ const getDetailShareData = (article, app_version = '6.9.11') => {
hideType = ['8', '9'];
}
const regexp = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g;
desc = desc.replace(regexp, '');
const authorName = (article.authorName || '').replace(regexp, '');
// desc = filterEmoji(desc);
desc = filterEmoji('整理闲置时↵↵↵“我是废墟里的公主👸🏻”');
const authorName = filterEmoji(article.authorName || '');
return {
title: `@${authorName} 在有货社区上发了一篇内容,快点开看看!`,
... ...
{
"name": "yoho-community-web",
"version": "6.9.13-RELEASE",
"version": "6.9.14-beta-1",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...