Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluesky => AP: fix last-line hashtag de-emphasis in Mastodon #1066

Open
snarfed opened this issue May 20, 2024 · 3 comments
Open

Bluesky => AP: fix last-line hashtag de-emphasis in Mastodon #1066

snarfed opened this issue May 20, 2024 · 3 comments
Labels
compat Protocol differences that need special handling.

Comments

@snarfed
Copy link
Owner

snarfed commented May 20, 2024

Originally posted by @Tamschi in #990 (comment) :

[Wrapping content in <p> tags to preserve whitespace] broke last-line hashtag de-emphasis in Mastodon.

Native (expected):
small hashtags below the attachment, only three shown by default

Bridged:
large hashtags as part of the main text, all visible

Nothing critical is broken, but it would be nice to have the native presentation here since having all hashtags in the body like that is slightly annoying to come across.

(This example is https://bsky.app/profile/tamschi.bsky.social/post/3ksxa6sa7l22p => https://mastodon.gamedev.place/@[email protected]/112475582044797265 )

@snarfed
Copy link
Owner Author

snarfed commented Jun 27, 2024

This is the inverse of #1010.

@snarfed snarfed changed the title AP: Fix last-line hashtag de-emphasis in Mastodon Bluesky => AP: fix last-line hashtag de-emphasis in Mastodon Jun 28, 2024
@snarfed
Copy link
Owner Author

snarfed commented Jun 28, 2024

Mastodon HTML for this content puts the last line of hashtags in a separate <p>. As an example, here's the AS2 content from https://indieweb.social/@snarfed/112691845131190192 (newline mine):

<p>foo bar hashtaggerific</p>
<p><a href="https://indieweb.social/tags/a" class="mention hashtag" rel="tag">#<span>a</span></a> <a href="https://indieweb.social/tags/b" class="mention hashtag" rel="tag">#<span>b</span></a> <a href="https://indieweb.social/tags/c" class="mention hashtag" rel="tag">#<span>c</span></a></p>

@snarfed
Copy link
Owner Author

snarfed commented Jun 28, 2024

Here's a minimal one I made manually that worked, https://indieweb.social/@[email protected]/112692577513995407 :

image
{
    "type": "Note",
    "id": "https://bsky.brid.gy/2024-06-19-not-real-e",
    "content": "<p>onece more with feeling<p><p><a href='https://bsky.brid.gy/hashtag/a'>#a</a> <a href='https://bsky.brid.gy/hashtag/b'>#b</a> <a href='https://bsky.brid.gy/hashtag/c'>#c</a></p>",
    "tag": [
      {
        "type": "Hashtag",
        "href": "https://bsky.brid.gy/tags/a",
        "name": "#a"
      },
      {
        "type": "Hashtag",
        "href": "https://bsky.brid.gy/tags/b",
        "name": "#b"
      },
      {
        "type": "Hashtag",
        "href": "https://bsky.brid.gy/tags/c",
        "name": "#c"
      }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat Protocol differences that need special handling.
Projects
None yet
Development

No branches or pull requests

2 participants