@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/browser/index.js
CHANGED
|
@@ -392,6 +392,12 @@ var getInlineMeta = (el, href) => {
|
|
|
392
392
|
isInline: textMatches || titleMatches
|
|
393
393
|
};
|
|
394
394
|
};
|
|
395
|
+
var addLineBreakBeforePostLink = (el, forApp, isInline) => {
|
|
396
|
+
if (forApp && isInline && el.parentNode) {
|
|
397
|
+
const br = el.ownerDocument.createElement("br");
|
|
398
|
+
el.parentNode.insertBefore(br, el);
|
|
399
|
+
}
|
|
400
|
+
};
|
|
395
401
|
function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
396
402
|
if (!el || !el.parentNode) {
|
|
397
403
|
return;
|
|
@@ -455,6 +461,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
455
461
|
el.setAttribute("href", h);
|
|
456
462
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
457
463
|
}
|
|
464
|
+
addLineBreakBeforePostLink(el, forApp, isInline);
|
|
458
465
|
return;
|
|
459
466
|
}
|
|
460
467
|
const mentionMatch = href.match(MENTION_REGEX);
|
|
@@ -532,6 +539,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
532
539
|
el.setAttribute("href", h);
|
|
533
540
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
534
541
|
}
|
|
542
|
+
addLineBreakBeforePostLink(el, forApp, isInline);
|
|
535
543
|
return;
|
|
536
544
|
}
|
|
537
545
|
}
|
|
@@ -596,6 +604,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
596
604
|
el.setAttribute("href", h);
|
|
597
605
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
598
606
|
}
|
|
607
|
+
addLineBreakBeforePostLink(el, forApp, isInline);
|
|
599
608
|
return;
|
|
600
609
|
}
|
|
601
610
|
}
|
|
@@ -681,6 +690,7 @@ function a(el, forApp, webp, parentDomain = "ecency.com") {
|
|
|
681
690
|
el.setAttribute("href", h);
|
|
682
691
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
683
692
|
}
|
|
693
|
+
addLineBreakBeforePostLink(el, forApp, isInline);
|
|
684
694
|
return;
|
|
685
695
|
}
|
|
686
696
|
const BCmatch = href.match(BITCHUTE_REGEX);
|