@ecency/render-helper 2.4.6 → 2.4.7

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.
@@ -424,6 +424,12 @@ var getInlineMeta = (el, href) => {
424
424
  isInline: textMatches || titleMatches
425
425
  };
426
426
  };
427
+ var addLineBreakBeforePostLink = (el, forApp, isInline) => {
428
+ if (forApp && isInline && el.parentNode) {
429
+ const br = el.ownerDocument.createElement("br");
430
+ el.parentNode.insertBefore(br, el);
431
+ }
432
+ };
427
433
  function a(el, forApp, webp, parentDomain = "ecency.com") {
428
434
  if (!el || !el.parentNode) {
429
435
  return;
@@ -487,6 +493,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
487
493
  el.setAttribute("href", h);
488
494
  el.setAttribute("data-is-inline", "" + isInline);
489
495
  }
496
+ addLineBreakBeforePostLink(el, forApp, isInline);
490
497
  return;
491
498
  }
492
499
  const mentionMatch = href.match(MENTION_REGEX);
@@ -564,6 +571,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
564
571
  el.setAttribute("href", h);
565
572
  el.setAttribute("data-is-inline", "" + isInline);
566
573
  }
574
+ addLineBreakBeforePostLink(el, forApp, isInline);
567
575
  return;
568
576
  }
569
577
  }
@@ -628,6 +636,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
628
636
  el.setAttribute("href", h);
629
637
  el.setAttribute("data-is-inline", "" + isInline);
630
638
  }
639
+ addLineBreakBeforePostLink(el, forApp, isInline);
631
640
  return;
632
641
  }
633
642
  }
@@ -713,6 +722,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
713
722
  el.setAttribute("href", h);
714
723
  el.setAttribute("data-is-inline", "" + isInline);
715
724
  }
725
+ addLineBreakBeforePostLink(el, forApp, isInline);
716
726
  return;
717
727
  }
718
728
  const BCmatch = href.match(BITCHUTE_REGEX);