@ecency/render-helper 2.5.15 → 2.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node/index.cjs
CHANGED
|
@@ -43,6 +43,8 @@ var WHITE_LIST = [
|
|
|
43
43
|
"ecency.com",
|
|
44
44
|
"hive.blog",
|
|
45
45
|
"peakd.com",
|
|
46
|
+
"snapie.io",
|
|
47
|
+
"hivesuite.app",
|
|
46
48
|
"travelfeed.io",
|
|
47
49
|
"dapplr.in",
|
|
48
50
|
"leofinance.io",
|
|
@@ -867,7 +869,7 @@ var matchesHref = (href, value) => {
|
|
|
867
869
|
return normalizeValue(value) === normalizedHref;
|
|
868
870
|
};
|
|
869
871
|
var normalizeDisplayText = (text2) => {
|
|
870
|
-
const beforeTrailingSlash = text2.trim().replace(/^https?:\/\/(www\.)?(ecency\.com|peakd\.com|hive\.blog)/i, "").replace(/^\/+/, "").split("?")[0].replace(/#@.*$/i, "");
|
|
872
|
+
const beforeTrailingSlash = text2.trim().replace(/^https?:\/\/(www\.)?(ecency\.com|peakd\.com|hive\.blog|leofinance\.io|inleo\.io|snapie\.io|hivesuite\.app)/i, "").replace(/^\/+/, "").split("?")[0].replace(/#@.*$/i, "");
|
|
871
873
|
return trimTrailingSlash(beforeTrailingSlash).toLowerCase();
|
|
872
874
|
};
|
|
873
875
|
var getInlineMeta = (el, href, author, permlink, communityTag) => {
|
|
@@ -1727,7 +1729,7 @@ function linkify(content, forApp, renderOptions) {
|
|
|
1727
1729
|
if (userLower.indexOf("/") === -1 && isValidUsername(user)) {
|
|
1728
1730
|
if (!forApp) {
|
|
1729
1731
|
const avatarSrc = `${getProxyBase()}/u/${userLower}/avatar/small`;
|
|
1730
|
-
const html = `${preceedings}<a class="er-author er-author-link" href="/@${userLower}"><img class="er-author-link-image" src="${avatarSrc}" alt="${userLower}"
|
|
1732
|
+
const html = `${preceedings}<a class="er-author er-author-link" href="/@${userLower}"><img class="er-author-link-image" src="${avatarSrc}" alt="${userLower}"/>@${userLower}</a>`;
|
|
1731
1733
|
const placeholder = `\u200C${authorPlaceholders.length}\u200C`;
|
|
1732
1734
|
authorPlaceholders.push({ placeholder, html });
|
|
1733
1735
|
return placeholder;
|