6
submitted 6 hours ago* (last edited 6 hours ago) by ki4jgt@feddit.org to c/opensource@lemmy.ml

Markdown should auto-number lines beginning with a period.

# Today's To-Do List
. Go shopping
. Feed the dog
. Water plants
. Pay bills
. Go get mail
. Put gas in the car

Why? Because you might need to get your mail before paying your bills. Changing the order means renumbering everything by hand. And if you have a huge list of things to do, you'll be renumbering every single item for every single change you make.

You can see how long the list is now. Imagine a couple hundred items, and you have to delete something. It's why HTML has ol and ul, instead of forcing you to number things by hand.

you are viewing a single comment's thread
view the rest of the comments
[-] ki4jgt@feddit.org -2 points 6 hours ago* (last edited 6 hours ago)

This doesn't happen for me, in any of my editors. And this question was asked 14 years ago. 14 years and the problem still isn't solved?

[-] A_norny_mousse@piefed.social 14 points 5 hours ago* (last edited 3 hours ago)

This doesn’t happen for me, in any of my editors.

Then there is a problem either with your editors or between keyboard and chair. Sorry. The

1. asdas
1. werwerwer
1. cvbcvbcvb

syntax works on all markdown implementations I'm aware of.

NB: the above is an example of the markdown syntax used, not the end result. End result here:

  1. asdas
  2. werwerwer
  3. cvbcvbcvb
[-] grue@lemmy.world 5 points 3 hours ago

Fun fact: unlike R*ddit, Lemmy's markdown implementation can start a list at a number other than 1 (but it'll still auto-number starting with the number you write).

2. Asdf
2. Asff
2. Adf
  1. Asdf
  2. Asff
  3. Adf

This is somewhat helpful if you want to split up your list with a paragraph in the middle, or if you want to continue a list from somebody else's comment.

[-] A_norny_mousse@piefed.social 2 points 3 hours ago

I think this is implementation-specific; my example is not, or at least I have never encountered an implementation that doesn't do that, since it's part of the original spec.

[-] GreyEyedGhost@piefed.ca 1 points 3 hours ago

When viewing your comment in Voyager, all lines start with 1.

[-] Pamasich@kbin.earth 10 points 3 hours ago

They did post a code block, not a real list. So no formatting is happening at all there.

[-] A_norny_mousse@piefed.social 5 points 3 hours ago* (last edited 3 hours ago)
  1. asdas
  2. werwerwer
  3. cvbcvbcvb

How 'bout now (same markdown as above)?

[-] GreyEyedGhost@piefed.ca 2 points 1 hour ago

Works perfectly. Another poster noted that you had used the code tag so no markdown was happening. Thanks for putting in the effort, appreciated.

[-] HelloRoot@lemy.lol 4 points 5 hours ago* (last edited 5 hours ago)

Works for me on lemy.lol for example and in Obsidian.

It's less of a problem and more a design decision.

The whole central concept of markdown is that it stays readable in it's raw form. There is only so much you can do about automatic numbering with that restriction.

[-] ki4jgt@feddit.org 0 points 5 hours ago

Which is more readable in the raw, a list of mis-numbered lines, or a list of lines starting with a period?

[-] HelloRoot@lemy.lol 3 points 3 hours ago

Both equally badly, but for somebody who doesn't know markdown, a list starting with 1. still looks like a numbered list, just weirdly numbered. But nobody knows why there is a dot at the beginning of the line until they learn that it shall magically be translated into a properly numbered list.

Thinking about it that way often gives youa good judgement on which option ismore intuitive for users.

"Clever tricks" are not intuitive.

this post was submitted on 02 Dec 2026
6 points (65.0% liked)

Open Source

50336 readers
321 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 7 years ago
MODERATORS