[-] sjmarf@lemmy.ml 3 points 2 months ago

Are you using the beta or the App Store build?

[-] sjmarf@lemmy.ml 4 points 2 months ago* (last edited 2 months ago)

Mlem dev here! Lemmy has a custom "flavor" of Markdown that is distinct from other social media platforms. Open-source markdown parsers and renderers exist for popular flavors of Markdown (e.g GitHub-flavor), but not for Lemmy-flavor. Most Lemmy clients choose to use an existing GitHub-flavor parser that is close enough to Lemmy's to be indistinguishable in most cases. Mlem uses swift-markdown-ui to render markdown, which uses cmark-gfm as its parser.

Lemmy's spoiler format is unique to Lemmy-flavor markdown, so that's one of the places where use of a third-party markdown parser is noticed by users. Other common parsing errors are ~subscript~ and footnotes.

Adding spoiler support is not particularly easy, unfortunately. You can't really apply spoiler-parsing logic on-top of another markdown parser - it has to be integrated into the parser itself. This is because the app needs to ignore spoiler markdown in certain situations, such as inside of a code block. The only good option is to write a custom markdown parser from scratch, or modify an existing markdown parser to support Lemmy's markdown dialect. Both options can be difficult for developers for several reasons:

  • cmark-gfm is written in C, which the developer of the Lemmy client may not be familiar with.
  • If the app is using a third-party renderer, and not just a parser, that renderer also needs to be rewritten to support the new parsing logic.

This takes a significant amount of time for comparatively little value for users, so most client developers didn't prioritise it.

In an upcoming Mlem version, we're replacing our markdown parser renderer with a custom one that can render spoilers and subscripts, but we've got a way to go before we achieve full parity with Lemmy. If any developers of other apps are using cmark-gfm, you're welcome to use our code from that repo under the terms of the licence.

Sorry this is kinda long, I hope this answers your question

[-] sjmarf@lemmy.ml 3 points 3 months ago* (last edited 3 months ago)

Mlem dev here. It shows strikethrough, but not superscript. Lemmy has got a unique dialect of Markdown - in the current version we're using an open-source Github-dialect parser, which is close to Lemmy's dialect but not perfect. In the next update we've written a custom parser that handles all of Lemmy's Markdown elements, including superscript and spoilers.

[-] sjmarf@lemmy.ml 3 points 5 months ago

That’s what I use in mlem.

Mlem dev here - we added a button for this to both the post editor and comment editor in our 1.3 update.

Post Comment
[-] sjmarf@lemmy.ml 3 points 6 months ago* (last edited 6 months ago)

I'm glad it's working now :)

[-] sjmarf@lemmy.ml 4 points 9 months ago* (last edited 8 months ago)

Yep, that's another way it could be done. We're hoping to add a text-selecting popup in the next major update, which will make this possible. However, it's not quite as seamless as having a dedicated "Translate" button that replaces the post/comment content inline, which I'd prefer to use if implementing it proves to be feasible.

[-] sjmarf@lemmy.ml 3 points 9 months ago* (last edited 9 months ago)

Yep! We fixed this in a TestFlight patch on Monday. GitHub

[-] sjmarf@lemmy.ml 3 points 9 months ago* (last edited 9 months ago)

Thanks for the report! I've fixed this, and it'll be live on TestFlight in a few days 👍

[-] sjmarf@lemmy.ml 3 points 9 months ago

Not currently, no. We're aware of this feature and are tracking it here.

[-] sjmarf@lemmy.ml 4 points 11 months ago

If you like, you can enable the setting for just Mlem by going into System Settings -> Accessibility -> Per-App Settings (it’s right at the bottom).

[-] sjmarf@lemmy.ml 3 points 1 year ago

It was added in 1.1, but it was made the default in the latest TestFlight :)

view more: ‹ prev next ›

sjmarf

joined 1 year ago