@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.mjs
CHANGED
|
@@ -14,6 +14,8 @@ var WHITE_LIST = [
|
|
|
14
14
|
"ecency.com",
|
|
15
15
|
"hive.blog",
|
|
16
16
|
"peakd.com",
|
|
17
|
+
"snapie.io",
|
|
18
|
+
"hivesuite.app",
|
|
17
19
|
"travelfeed.io",
|
|
18
20
|
"dapplr.in",
|
|
19
21
|
"leofinance.io",
|
|
@@ -838,7 +840,7 @@ var matchesHref = (href, value) => {
|
|
|
838
840
|
return normalizeValue(value) === normalizedHref;
|
|
839
841
|
};
|
|
840
842
|
var normalizeDisplayText = (text2) => {
|
|
841
|
-
const beforeTrailingSlash = text2.trim().replace(/^https?:\/\/(www\.)?(ecency\.com|peakd\.com|hive\.blog)/i, "").replace(/^\/+/, "").split("?")[0].replace(/#@.*$/i, "");
|
|
843
|
+
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, "");
|
|
842
844
|
return trimTrailingSlash(beforeTrailingSlash).toLowerCase();
|
|
843
845
|
};
|
|
844
846
|
var getInlineMeta = (el, href, author, permlink, communityTag) => {
|
|
@@ -1698,7 +1700,7 @@ function linkify(content, forApp, renderOptions) {
|
|
|
1698
1700
|
if (userLower.indexOf("/") === -1 && isValidUsername(user)) {
|
|
1699
1701
|
if (!forApp) {
|
|
1700
1702
|
const avatarSrc = `${getProxyBase()}/u/${userLower}/avatar/small`;
|
|
1701
|
-
const html = `${preceedings}<a class="er-author er-author-link" href="/@${userLower}"><img class="er-author-link-image" src="${avatarSrc}" alt="${userLower}"
|
|
1703
|
+
const html = `${preceedings}<a class="er-author er-author-link" href="/@${userLower}"><img class="er-author-link-image" src="${avatarSrc}" alt="${userLower}"/>@${userLower}</a>`;
|
|
1702
1704
|
const placeholder = `\u200C${authorPlaceholders.length}\u200C`;
|
|
1703
1705
|
authorPlaceholders.push({ placeholder, html });
|
|
1704
1706
|
return placeholder;
|