forked from AkkomaGang/akkoma-fe
Merge branch 'fix-hashtags' into 'develop'
fix hashtags by explicitly putting attributes See merge request pleroma/pleroma-fe!1513
This commit is contained in:
commit
1041a38f14
2 changed files with 6 additions and 3 deletions
|
@ -28,6 +28,10 @@ import './rich_content.scss'
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
name: 'RichContent',
|
name: 'RichContent',
|
||||||
|
components: {
|
||||||
|
MentionsLine,
|
||||||
|
HashtagLink
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
// Original html content
|
// Original html content
|
||||||
html: {
|
html: {
|
||||||
|
@ -86,7 +90,8 @@ export default {
|
||||||
if (!encounteredTextReverse) {
|
if (!encounteredTextReverse) {
|
||||||
lastTags.push(linkData)
|
lastTags.push(linkData)
|
||||||
}
|
}
|
||||||
return <HashtagLink { ...linkData }/>
|
const { url, tag, content } = linkData
|
||||||
|
return <HashtagLink url={url} tag={tag} content={content}/>
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderMention = (attrs, children) => {
|
const renderMention = (attrs, children) => {
|
||||||
|
|
|
@ -308,10 +308,8 @@ describe('RichContent', () => {
|
||||||
'<a href="http://macrochan.org/images/N/H/NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg" target="_blank">',
|
'<a href="http://macrochan.org/images/N/H/NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg" target="_blank">',
|
||||||
'NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg</a>',
|
'NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg</a>',
|
||||||
' <hashtag-link-stub url="https://shitposter.club/tag/nou" content="#nou" tag="nou">',
|
' <hashtag-link-stub url="https://shitposter.club/tag/nou" content="#nou" tag="nou">',
|
||||||
'#nou',
|
|
||||||
'</hashtag-link-stub>',
|
'</hashtag-link-stub>',
|
||||||
' <hashtag-link-stub url="https://shitposter.club/tag/screencap" content="#screencap" tag="screencap">',
|
' <hashtag-link-stub url="https://shitposter.club/tag/screencap" content="#screencap" tag="screencap">',
|
||||||
'#screencap',
|
|
||||||
'</hashtag-link-stub>',
|
'</hashtag-link-stub>',
|
||||||
' </p>'
|
' </p>'
|
||||||
].join('')
|
].join('')
|
||||||
|
|
Loading…
Reference in a new issue