|
|
/* eslint-disable indent */
|
|
|
import { get, first } from 'lodash';
|
|
|
import emojiRegex from 'emoji-regex';
|
|
|
|
|
|
function _version2num(version) {
|
|
|
if (!version) {
|
...
|
...
|
@@ -40,13 +41,9 @@ function handleProtocol(url) { |
|
|
}
|
|
|
|
|
|
const filterEmoji = (text) => {
|
|
|
const ranges = [
|
|
|
'\ud83c[\udf00-\udfff]',
|
|
|
'\ud83d[\udc00-\ude4f]',
|
|
|
'\ud83d[\ude80-\udeff]'
|
|
|
];
|
|
|
const regexp = emojiRegex();
|
|
|
|
|
|
return text.replace(new RegExp(ranges.join('|'), 'g'), '');
|
|
|
return text.replace(regexp, '');
|
|
|
};
|
|
|
|
|
|
// eslint-disable-next-line no-unused-vars
|
...
|
...
|
@@ -91,7 +88,6 @@ const getDetailShareData = (article, app_version = '6.9.11') => { |
|
|
}
|
|
|
|
|
|
|
|
|
// desc = filterEmoji(desc);
|
|
|
desc = filterEmoji(desc);
|
|
|
const authorName = filterEmoji(article.authorName || '');
|
|
|
|
...
|
...
|
|