• AmidFuror@fedia.io
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    12 hours ago

    I’d settle for good spelling and grammar. Once most posters have mastered that, let them play with the formatting.

  • Andrew@piefed.social
    link
    fedilink
    English
    arrow-up
    32
    ·
    16 hours ago

    You can, but maybe you shouldn’t. Given that this post is in the fediverse community, I don’t feel too bad about mentioning that Lemmy is part of a federated network with PieFed and MBIN (I try not to bollock on too much about the platform I happen to be using).

    In the ActivityPub JSON for this post, there is no indication that this field contains MarkDown. If anything, it says the opposite, it says it contains HTML. It’s therefore not unreasonable for other platforms to render it as such.

    Given this, and the poor support for mobile clients indicated in the comments, and the fact that it’s only a subset of MarkDown tags, but include ones that aren’t part of CommonMark standard, I’d argue that it’s not necessarily a good idea.

    • flamingos-cant@feddit.uk
      link
      fedilink
      English
      arrow-up
      14
      ·
      15 hours ago

      In the ActivityPub JSON for this post, there is no indication that this field contains MarkDown. If anything, it says the opposite, it says it contains HTML. It’s therefore not unreasonable for other platforms to render it as such.

      Actually, the name property is explicitly plain text, it shouldn’t contain any type of markup, whether that be markdown or HTML.

      • Andrew@piefed.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        14 hours ago

        Oh, wow. Thanks.

        For clarity, I wasn’t intending to say that PieFed treats that field as HTML (it treats it as text), I just meant that if you were looking at that JSON, and being a bit lazy like me and not looking at specs, then it wouldn’t be unreasonable to assume that the ‘mediaType’ field also refers to ‘name’ (rather than a ‘content’ field which this post doesn’t happen to have).

        Anyway, this seems to be even more reason why MD shouldn’t be put in titles, and front-ends shouldn’t be encouraging the practise by rendering it.

        • Kat@orbi.camp
          link
          fedilink
          English
          arrow-up
          2
          ·
          11 hours ago

          Eh, I’ll probably use italics tho, just like I did * in reddit.

    • AA5B@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      15 hours ago

      In the ActivityPub JSON for this post, there is no indication that this field contains MarkDown. …. it says it contains HTML

      This seems like a bug. Regardless of what clients may support, the json ought to accurately describe fields

      • Andrew@piefed.social
        link
        fedilink
        English
        arrow-up
        7
        ·
        14 hours ago

        Another commenter (who’s contributed code to Lemmy) pointed to a link that provides the specification for that field: “A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included.”

        So in this case, it’s more that the JSON looks a bit ambiguous: ‘mediaType’ is only referring to the format of the text in a post’s body, but - unlike me - you’d also need to be aware of the spec to know that it doesn’t apply to the title.

      • Andrew@piefed.social
        link
        fedilink
        English
        arrow-up
        5
        ·
        16 hours ago

        Yes - it’s easy to do from a command line. For this post, it would be:

        curl --header 'accept: application/activity+json' --location https://lemmy.world/post/24241974 | jq .

        it looks like
        {  
          "@context": [  
            "https://join-lemmy.org/context.json",  
            "https://www.w3.org/ns/activitystreams"  
          ],  
          "type": "Page",  
          "id": "https://lemmy.world/post/24241974",  
          "attributedTo": "https://lemmy.world/u/amon",  
          "to": [  
            "https://lemmy.world/c/fediverse",  
            "https://www.w3.org/ns/activitystreams#Public"  
          ],  
          "name": "By the way, you can have `Markdown` in Lemmy post titles",  
          "cc": [],  
          "mediaType": "text/html",  
          "attachment": [],  
          "commentsEnabled": true,  
          "sensitive": false,  
          "published": "2025-01-13T20:48:50.824942Z",  
          "language": {  
            "identifier": "en",  
            "name": "English"  
          },  
          "audience": "https://lemmy.world/c/fediverse"  
        }   
        
  • misk@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    7
    ·
    16 hours ago

    What good is it for if I can’t change post title font to Comic Sans.

  • JohnnyEnzyme@lemm.ee
    link
    fedilink
    English
    arrow-up
    7
    ·
    18 hours ago

    (unlike Reddit, for example)

    I use bold and italic a lot in post titles. Some of the other stuff wouldn’t make much sense I don’t think, but every little bit helps.

  • perviouslyiner@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    17 hours ago

    Be careful of the character limit on each viewer, as they can “trim” your title in the middle of some markup tag and just display part of it as the title.