this post was submitted on 12 Jul 2023
207 points (100.0% liked)

Sync for Lemmy

15165 readers
1 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^

you are viewing a single comment's thread
view the rest of the comments
[โ€“] 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.