@ecency/render-helper 2.5.9 → 2.5.10

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.
@@ -727,7 +727,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext, renderOptions) {
727
727
  el.setAttribute("data-author", author);
728
728
  el.setAttribute("data-permlink", permlink);
729
729
  } else {
730
- const h = `/${tag}/@${author}/${permlink}`;
730
+ const h = `/@${author}/${permlink}`;
731
731
  el.setAttribute("href", h);
732
732
  el.setAttribute("data-is-inline", "" + isInline);
733
733
  }
@@ -806,7 +806,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext, renderOptions) {
806
806
  el.setAttribute("data-author", author);
807
807
  el.setAttribute("data-permlink", permlink);
808
808
  } else {
809
- const h = `/${tag}/@${author}/${permlink}`;
809
+ const h = `/@${author}/${permlink}`;
810
810
  el.setAttribute("href", h);
811
811
  el.setAttribute("data-is-inline", "" + isInline);
812
812
  }
@@ -871,7 +871,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext, renderOptions) {
871
871
  el.setAttribute("data-author", author);
872
872
  el.setAttribute("data-permlink", permlink);
873
873
  } else {
874
- const h = `/${tag}/@${author}/${permlink}`;
874
+ const h = `/@${author}/${permlink}`;
875
875
  el.setAttribute("href", h);
876
876
  el.setAttribute("data-is-inline", "" + isInline);
877
877
  }
@@ -957,7 +957,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext, renderOptions) {
957
957
  el.setAttribute("data-author", author);
958
958
  el.setAttribute("data-permlink", permlink);
959
959
  } else {
960
- const h = `/${tag}/@${author}/${permlink}`;
960
+ const h = `/@${author}/${permlink}`;
961
961
  el.setAttribute("href", h);
962
962
  el.setAttribute("data-is-inline", "" + isInline);
963
963
  }
@@ -1501,7 +1501,7 @@ function linkify(content, forApp, renderOptions) {
1501
1501
  const attrs = forApp ? `href="https://ecency.com/@${authorLower}/${permlink}"` : `href="/@${authorLower}/${permlink}"`;
1502
1502
  return `${preceding}<a class="markdown-profile-link" ${attrs}>@${authorLower}/${permlink}</a>`;
1503
1503
  } else {
1504
- const attrs = forApp ? `data-author="${authorLower}" data-tag="${tag}" data-permlink="${permlink}"` : `href="/${tag}/@${authorLower}/${permlink}"`;
1504
+ const attrs = forApp ? `data-author="${authorLower}" data-tag="${tag}" data-permlink="${permlink}"` : `href="/@${authorLower}/${permlink}"`;
1505
1505
  return `${preceding}<a class="markdown-post-link" ${attrs}>@${authorLower}/${permlink}</a>`;
1506
1506
  }
1507
1507
  }
@@ -1516,7 +1516,7 @@ function linkify(content, forApp, renderOptions) {
1516
1516
  const attrs = forApp ? `href="https://ecency.com/@${uu}/${permlink}"` : `href="/@${uu}/${permlink}"`;
1517
1517
  return ` <a class="markdown-profile-link" ${attrs}>@${uu}/${permlink}</a>`;
1518
1518
  } else {
1519
- const attrs = forApp ? `data-author="${uu}" data-tag="post" data-permlink="${permlink}"` : `href="/post/@${uu}/${permlink}"`;
1519
+ const attrs = forApp ? `data-author="${uu}" data-tag="post" data-permlink="${permlink}"` : `href="/@${uu}/${permlink}"`;
1520
1520
  return ` <a class="markdown-post-link" ${attrs}>@${uu}/${permlink}</a>`;
1521
1521
  }
1522
1522
  }
@@ -1611,7 +1611,7 @@ function text(node, forApp, renderOptions) {
1611
1611
  if (!tag || !/^[a-z0-9_-]+$/i.test(tag)) return;
1612
1612
  if (!isValidUsername(author)) return;
1613
1613
  if (!isValidPermlink(permlink)) return;
1614
- const attrs = forApp ? `data-tag="${tag}" data-author="${author}" data-permlink="${permlink}" class="markdown-post-link"` : `class="markdown-post-link" href="/${tag}/@${author}/${permlink}"`;
1614
+ const attrs = forApp ? `data-tag="${tag}" data-author="${author}" data-permlink="${permlink}" class="markdown-post-link"` : `class="markdown-post-link" href="/@${author}/${permlink}"`;
1615
1615
  const doc = DOMParser.parseFromString(
1616
1616
  `<a ${attrs}>/@${author}/${permlink}</a>`,
1617
1617
  "text/html"