204
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 12 Jul 2023
204 points (99.0% liked)
Sync for Lemmy
15088 readers
51 users here now
๐
Welcome to 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
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.