@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.
- package/dist/browser/index.js +10 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +10 -0
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +10 -0
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -395,6 +395,12 @@ var getInlineMeta = (el, href) => {
|
|
|
395
395
|
isInline: textMatches || titleMatches
|
|
396
396
|
};
|
|
397
397
|
};
|
|
398
|
+
var addLineBreakBeforePostLink = (el, forApp, isInline) => {
|
|
399
|
+
if (forApp && isInline && el.parentNode) {
|
|
400
|
+
const br = el.ownerDocument.createElement("br");
|
|
401
|
+
el.parentNode.insertBefore(br, el);
|
|
402
|
+
}
|
|
403
|
+
};
|
|
398
404
|
function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
399
405
|
if (!el || !el.parentNode) {
|
|
400
406
|
return;
|
|
@@ -458,6 +464,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
458
464
|
el.setAttribute("href", h);
|
|
459
465
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
460
466
|
}
|
|
467
|
+
addLineBreakBeforePostLink(el, forApp, isInline);
|
|
461
468
|
return;
|
|
462
469
|
}
|
|
463
470
|
const mentionMatch = href.match(MENTION_REGEX);
|
|
@@ -535,6 +542,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
535
542
|
el.setAttribute("href", h);
|
|
536
543
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
537
544
|
}
|
|
545
|
+
addLineBreakBeforePostLink(el, forApp, isInline);
|
|
538
546
|
return;
|
|
539
547
|
}
|
|
540
548
|
}
|
|
@@ -599,6 +607,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
599
607
|
el.setAttribute("href", h);
|
|
600
608
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
601
609
|
}
|
|
610
|
+
addLineBreakBeforePostLink(el, forApp, isInline);
|
|
602
611
|
return;
|
|
603
612
|
}
|
|
604
613
|
}
|
|
@@ -684,6 +693,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
684
693
|
el.setAttribute("href", h);
|
|
685
694
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
686
695
|
}
|
|
696
|
+
addLineBreakBeforePostLink(el, forApp, isInline);
|
|
687
697
|
return;
|
|
688
698
|
}
|
|
689
699
|
const BCmatch = href.match(BITCHUTE_REGEX);
|