logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 1041a38f140e5a21a170ff68fcbf044991d78d81
parent c2a4051d72683759344c5de4dcb8d6178198e427
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date:   Tue, 12 Apr 2022 16:09:33 +0000

Merge branch 'fix-hashtags' into 'develop'

fix hashtags by explicitly putting attributes

See merge request pleroma/pleroma-fe!1513

Diffstat:

Msrc/components/rich_content/rich_content.jsx7++++++-
Mtest/unit/specs/components/rich_content.spec.js2--
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx @@ -28,6 +28,10 @@ import './rich_content.scss' */ export default { name: 'RichContent', + components: { + MentionsLine, + HashtagLink + }, props: { // Original html content html: { @@ -86,7 +90,8 @@ export default { if (!encounteredTextReverse) { lastTags.push(linkData) } - return <HashtagLink { ...linkData }/> + const { url, tag, content } = linkData + return <HashtagLink url={url} tag={tag} content={content}/> } const renderMention = (attrs, children) => { diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js @@ -308,10 +308,8 @@ describe('RichContent', () => { '<a href="http://macrochan.org/images/N/H/NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg" target="_blank">', 'NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg</a>', ' <hashtag-link-stub url="https://shitposter.club/tag/nou" content="#nou" tag="nou">', - '#nou', '</hashtag-link-stub>', ' <hashtag-link-stub url="https://shitposter.club/tag/screencap" content="#screencap" tag="screencap">', - '#screencap', '</hashtag-link-stub>', ' </p>' ].join('')