1. 8

  2. 1

    If I decide later to skip the numbers and use bullets instead, I tell the computer to introduce each list item with a bullet. This is one command covering the whole list.

    In this respect, Markdown is a step backwards compared to directly writing HTML. I wonder if there are any other lightweight markup languages that have this feature of whatever the author is using (presumably LaTeX).

    1. 2
      1. Word does have this feature. It’s just that lots of people don’t know about it, or don’t like what it does to the formatting, so they don’t use it.

      2. Markdown has this feature, too. If you prefix every numbered item with “1.”, then it will number them for you.

      1. 1

        That’s not the feature being discussed, it’s turning an ordered list into an unordered list. In HTML it’s replacing the opening and closing ol with ul. In Markdown, it’s replacing *1*. with * in every entry (and if you’re keeping different numbers, that’s a complex find & replace).

        1. 1

          It’s also one of the features which makes markdown less usable as a markup language for non-programmers. On Reddit, I frequently see comments starting with a “1.” because the author wanted to start their comment with a number + period and markdown interpreted it as a list entry.

          1. 2

            How many times have I seen this?

            1. This has been a test of markdown lists.

            Edit: turns out lobsters does the wrong thing here. Probably won’t dig into the css that caused this tiny mistake in an edge case. I wrote 12345.

        2. 2

          In CommonMark, at least, it appears that only the first number in the list matters:

          1. List item 1.
          1. List item 2.

          Is turned into:

          1. List item 1.
          2. List item 2.

          This also works on lobste.rs, it seems. So in theory swapping all of one type of bullet point for another is easier than manually changing all numbers, but you are correct in that it’s still more difficult than it would be in HTML or LaTeX.

          Edit: Oops, I didn’t refresh the page before answering your comment, sorry. I was beaten to it by 20 minutes.

          1. 2

            Emacs’ Org-mode uses the same markup but will automatically fix up the numbering in the markup itself as you move things (e.g., when moving a line with M-up or M-down) or when you ask it to with C-c C-c.

            1. 1

              This behavior is in the original Markdown code/spec:


            2. 2

              In a programmers text editor, this is not an expensive thing to change. (In vim something like: Vip:s/^\d+\./ -/, probably need “magic” on)

              Markdown is designed to be readable and presentable as source code, and it would obviously be more difficult to work out which numbered item was which if they didn’t have the number next to them.

              If you want a more expressive markup language there are plenty :)