this post was submitted on 12 Jul 2023
205 points (99.0% liked)

Sync for Lemmy

15148 readers
9 users here now

๐Ÿ‘€


Welcome to Sync for Lemmy!

Download Sync for Lemmy


Welcome to the official Sync for Lemmy community.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Community Rules


1- No advertising or spam.

All types of advertising and spam are restricted in this community.



Community Credits

Artwork and community banner by: @MargotRobbie@lemmy.world


founded 1 year ago
MODERATORS
 

Given that Jebora has markdown support, just throwing a few bits in here...

bold and italic

  • li item 1
  • li item 2

Quote

heading

link

inline code

Code block
// Not trying xss just doing examples
alert("example")

~~strike~~

~sub~

^up^

top 37 comments
sorted by: hot top controversial new old
[โ€“] abfarid@lemmy.world 31 points 1 year ago (6 children)

On Connect, sub and up (which, I assume, was supposed to say sup) don't get formatted.

[โ€“] Ghosty141@feddit.de 16 points 1 year ago* (last edited 1 year ago) (1 children)
[โ€“] crocodileneptune@discuss.tchncs.de 5 points 1 year ago (1 children)

The website or the Memmy app?

[โ€“] Ghosty141@feddit.de 5 points 1 year ago

Woops, typo. Yeah Memmy!

[โ€“] Coelacanth@feddit.nu 7 points 1 year ago

Liftoff too.

Yeah, the sub (subscript) and up (superscript) were from Jebora's editor, but they didn't even render once posted

[โ€“] ayyndrew@lemmy.world 6 points 1 year ago (1 children)
[โ€“] DrMario@lemmy.world 3 points 1 year ago

Same on Memmy

[โ€“] Chariotwheel@kbin.social 2 points 1 year ago

Kbin as well

Its because they created a special syntax for ~sub~ ^up^ and

SpoilerTest

[โ€“] tal@kbin.social 20 points 1 year ago* (last edited 1 year ago) (1 children)

One thing I've never been enthusiastic about has been Markdown's auto-renumbering support. I have never seen someone really being happy with the implementation and lots of people frustrated as they try to embed numbered items and get them renumbered.

1. First

1. Second

Yields:

  1. First

  2. Second

Usually came up on Reddit when someone wants to quote a single item in a numbered list from some external text, quotes only that, and it gets renumbered...and they don't know how to backslash-escape the period to avoid the thing:

1\. First

1\. Second

Yields:

  1. First

  2. Second

It looks like kbin also does the auto-renumbering. Dunno about lemmy. Kind of the one element of Markdown that I'd be happy to see die. I don't mind having a syntax for auto-numbered lists -- I just don't think that using an actual number as prefix to indicate that that should happen is a reasonable way to go about it.

[โ€“] shroomato@lemmy.world 6 points 1 year ago

Markdown is pretty 'dumb' in that it simply uses regular expressions to detect markdown tags/structures and then translates them into corresponding html elements. So when it sees subsequent lines each starting with a '{number}{dot}{space}' it determines that it's supposed to be a numbered list, so it translates that to an html ordered list. The numbers in an ordered list are not there if you look at a page source, they're only being rendered by your browser starting with '1' by default.

With all that being said, HTML5 supports overriding default values in an ordered list, so with additional logic in the markdown parser having numbers out of order could be done.

[โ€“] somePotato@sh.itjust.works 18 points 1 year ago (3 children)
[โ€“] Grass@geddit.social 6 points 1 year ago

I'm so glad people still remember the alot

[โ€“] SINapps@lemmy.world 3 points 1 year ago

came here to do this.

[โ€“] Da_Boom@iusearchlinux.fyi 2 points 1 year ago

Oof broken link.

But for anyone who wonders, here's the original source of the meme:

http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html?m=1

[โ€“] chaorace@lemmy.sdf.org 14 points 1 year ago* (last edited 1 year ago) (2 children)

For anyone interested, here's the Lemmy markdown configuration. As you can see, Lemmy's website UI supports the full commonmark spec (tutorial / official spec), plus a bunch of extensions. I don't think anyone's fully documented these yet, so I'll try doing so below. Apologies in advance to mobile users, this is probably gonna get ugly (see included image links for how it should look):

  • URL autolinking (plaintext URLs automatically turn into links)
  • Lemmy autolinking:
    • NOTE: No link will be inserted if the viewer is browsing an instance where the resource is not yet known/blocked
    • Communities: [!fediverse@lemmy.ml](/c/fediverse@lemmy.ml)โ†’!fediverse@lemmy.ml (link ref: /c/fediverse@lemmy.ml)
      • Kbin-style is also supported: /m/fediverse@lemmy.mlโ†’/m/fediverse@lemmy.ml
    • Users: /u/chaorace@lemmy.sdf.orgโ†’ /u/chaorace@lemmy.sdf.org (link ref: /u/chaorace@lemmy.sdf.org)
  • Typography substitutions:
    • (c)โ†’ยฉ
    • (tm)โ†’โ„ข
    • (r)โ†’ยฎ
    • +-โ†’ยฑ
    • ...โ†’โ€ฆ
    • ---โ†’โ€”
    • --โ†’โ€“
    • ???? (>= 4x)โ†’???
    • !!!! (>= 4x)โ†’!!!
  • Github-flavor Markdown extensions:
    • Tables
    • Strikethrough: ~~example~~โ†’~~example~~ (image)
  • Subscript/Superscript:
    • Sub: example~sub~โ†’example~sub~ (image)
    • Super: example^super^โ†’example^super^ (image)
  • Footnotes:
    • Inline part: example[^notename]โ†’example[^notename] (image)
    • Bottom part: [^notename]: Note textโ†’(see bottom of post) (image)
      • Important: the bottom part must be at the very end of the post, otherwise both halves of the footnote will break!
  • Ruby Text: {example base text|example ruby text}โ†’{example base text|example ruby text} (image)
    • "Ruby" is an html-ism for special pronunciation aids which frequently appear within young person's media where the language includes non-phonetic characters (e.g.: Chinese characters)
    • Japanese Furigana example: {ๅ‡„|ใ™ใ”}ใ„๏ผโ†’{ๅ‡„|ใ™ใ”}ใ„๏ผ(image)
  • Spoilers:
    visible part examplehidden part example
  • Image/Video embedding: ![accessibility alt-text example](https://i.imgur.com/9nVMRqa.jpeg) => accessibility alt-text example (image)

[^notename]: Note text

[โ€“] oohgodyeah@lemmy.world 2 points 1 year ago* (last edited 1 year ago) (1 children)

Your hyperlink to the Official Spec doesn't work for me on Vger. It launches my web browser without a URL and hiding down on the link doesn't reveal its destination.

[โ€“] chaorace@lemmy.sdf.org 3 points 1 year ago (1 children)

Nice catch. I messed up the formatting on that link by putting an extra pair of parenthesis in there -- fixed now.

[โ€“] oohgodyeah@lemmy.world 3 points 1 year ago

Confirmed that link is working now. Thanks for this useful info!

[โ€“] orphiebaby@lemmy.world 2 points 1 year ago

I think this should be put on a page someone on Lemmy. Somewhere that's easy to find. The tables and stuff too.

[โ€“] redditmigrant@infosec.pub 11 points 1 year ago (1 children)

Curiously enough, it only has Markdown support once you are inside the Thread:

[โ€“] neardeaf@lemm.ee 0 points 1 year ago (1 children)

Iโ€™m not mad at that for now, but eventually sure!

[โ€“] redditmigrant@infosec.pub 2 points 1 year ago

Well, you can always be the change that you want to see in this world!

[โ€“] Mythril@lemm.ee 10 points 1 year ago* (last edited 1 year ago) (1 children)

That reminds me of the threads/comments about the spoiler tagging in Lemmy being broken in many apps, hopefully that'll be worked out sooner than later.

This is a spoilerMagneto kills Dumbledore in Mordor

Just tested and it doesn't seem to work in neither Connect, Voyager/wefwef, Liftoff nor even in Jerboa... Only worked in the Lemmy PWA.

[โ€“] Xylight@lemmy.xylight.dev 5 points 1 year ago (1 children)

I don't believe spoilers are part of the official markdown specification. Even if markdown parsers supported it, I'd assume it would be ||this is a message||

[โ€“] Mythril@lemm.ee 3 points 1 year ago

Yeah I guess the apps are just using regular markdown libraries so they haven't added any "Lemmy extras" to the parsing.

[โ€“] yopla@lemmy.world 4 points 1 year ago

What about tables ?

1 2 3 4
5 6 7 8
[โ€“] tal@kbin.social 4 points 1 year ago* (last edited 1 year ago)

Kbin's implementation differs from Reddit's in at least one way that I've run into: Reddit permitted a link to be italicized using asterisks inside the link. Like:

I read a [book called *Arabian Nights*](https://en.wikipedia.org/wiki/One_Thousand_and_One_Nights).

Valid in Reddit Markdown, but in kbin's Markdown -- dunno what lemmy does -- that's not permitted, and gives this:

I read a book called .

You can do:

I read a book called *[Arabian Nights](https://en.wikipedia.org/wiki/One_Thousand_and_One_Nights)*.

Which yields this:

I read a book called Arabian Nights.

[โ€“] breadsmasher@lemmy.world 3 points 1 year ago* (last edited 1 year ago) (1 children)

~sub~ should have two ~

~~sub~~

I guess ^up^ should have two ^ as well?

^^up^^

~~^^ doesnt seem to do anything~~

Memmy seems to have slightly different markdown rendering

[โ€“] Scaldart@lemmy.world 3 points 1 year ago

The only two things formatting makdown consistently, for now, are Jerboa and the web interfaces.

I've been posting a lot of poetry using some markdown witchery to format, only to realize that some interfaces show all of the markdown even inside the post itself. Jerboa will show it in the summary tile before you click in, but it does format.

[โ€“] Soullioness@lemmy.world 3 points 1 year ago

Everything except code block works for me on liftoff.

[โ€“] toasteranimation@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

error loading comment

[โ€“] Chariotwheel@kbin.social 2 points 1 year ago (1 children)

Code Block is broken, but the rest works on kbin.

[โ€“] Hiru@lemmy.world 1 points 1 year ago

it works yeah!

load more comments
view more: next โ€บ