feat: hide redudant mentions (#1293)

This commit is contained in:
patak 2023-01-18 16:59:37 +01:00 committed by GitHub
parent da2f19fb23
commit 3132f4fdea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 186 additions and 30 deletions

View file

@ -92,6 +92,25 @@ exports[`html-parse > empty > html 1`] = `""`;
exports[`html-parse > empty > text 1`] = `""`;
exports[`html-parse > hide mentions in context > html 1`] = `
"<p>
<mention-group
><span class=\\"h-card\\"
><a
href=\\"/@haoqun@webtoo.ls\\"
class=\\"u-url mention\\"
rel=\\"nofollow noopener noreferrer\\"
target=\\"_blank\\"
>@<span>haoqun</span></a
></span
></mention-group
>Great to see this happening
</p>
"
`;
exports[`html-parse > hide mentions in context > text 1`] = `"@haoqunGreat to see this happening"`;
exports[`html-parse > html entities > html 1`] = `
"<p>Hello &lt;World /&gt;.</p>
"
@ -142,3 +161,50 @@ exports[`html-parse > link + mention > html 1`] = `
`;
exports[`html-parse > link + mention > text 1`] = `"Happy 🤗 were now using @vitest (migrated from chai+mocha) https://github.com/ayoayco/astro-reactive-library/pull/203"`;
exports[`html-parse > mentions without context > html 1`] = `
"<p>
<mention-group
><span class=\\"h-card\\"
><a
href=\\"/@haoqun@webtoo.ls\\"
class=\\"u-url mention\\"
rel=\\"nofollow noopener noreferrer\\"
target=\\"_blank\\"
>@<span>haoqun</span></a
></span
></mention-group
>Great to see this happening
</p>
"
`;
exports[`html-parse > mentions without context > text 1`] = `"@haoqunGreat to see this happening"`;
exports[`html-parse > show mentions in context > html 1`] = `
"<p>
<mention-group
><span class=\\"h-card\\"
><a
href=\\"/@haoqun@webtoo.ls\\"
class=\\"u-url mention\\"
rel=\\"nofollow noopener noreferrer\\"
target=\\"_blank\\"
>@<span>haoqun</span></a
></span
>
<span class=\\"h-card\\"
><a
href=\\"/@antfu@webtoo.ls\\"
class=\\"u-url mention\\"
rel=\\"nofollow noopener noreferrer\\"
target=\\"_blank\\"
>@<span>antfu</span></a
></span
></mention-group
>Great to see this happening
</p>
"
`;
exports[`html-parse > show mentions in context > text 1`] = `"@haoqun @antfuGreat to see this happening"`;