News for hackers. Stuff that matters.
Re:Why Markdown Sucks (2016) by fxfan on Thursday April 25, 2019 @04:56AM (#19746243)
Neither markdown nor any of the other light weight marktup languages mentioned here (so far and likely till expiry) can do numbered lists ;)
Re:Why Markdown Sucks (2016) by indentit on Thursday April 25, 2019 @05:03AM (#19746282)
Perhaps you could explain that a bit more, please? AFAIK, HTML's "<ol><li>" tags work just fine, as does Markdown's "1." syntax...
Re:Why Markdown Sucks (2016) by castillar76 on Thursday April 25, 2019 @09:37AM (#19747897)
I'll add to this one: Markdown is perfectly capable of using numbers as ordinals. What it's not capable of—bizarrely—is using letters as ordinals. You cannot have the following:

a) foo

b) bar

c) baz

You have to do that manually. And it won't indent, or re-number automatically, or anything else. I don't know whether Gruber thought "I'll get to that later" or if he isn't the sort of person that ever writes a/b/c/d/e lists, or if he figured it was too hard to adapt the parser for it, but the result is that you can't do that in vanilla Markdown, which means you also can't do that in documents published in Github.

Which is why we've moved our document chain to Asciidoc. :)

Re:Why Markdown Sucks (2016) by fxfan on Thursday April 25, 2019 @05:08AM (#19746311)
Sure.

I wasn't counting HTML's ol tag, that's not fair :)

1. Nissan 2. Tesla 3. BYD

To (god forbid!) remove Tesla, you have to write

1. Nissan 2. BYD

Now generate a diff:

  -- 2. Tesla --
  -- 3. BYD   --
  ++ 2. BYD   --
Ideally the diff should be:

  -- <some marker> Tesla --
Re:Why Markdown Sucks (2016) by chrishannah on Thursday April 25, 2019 @05:17AM (#19746355)
Although I would argue it looks better, you don't have to use sequential numbers when defining ordered lists.

Taken from the Markdown Syntax Documentation (https://daringfireball.net/projects/markdown/syntax):

It’s important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:

    <ol>
    <li>Bird</li>
    <li>McHale</li>
    <li>Parish</li>
    </ol>
If you instead wrote the list in Markdown like this:

    1.  Bird
    1.  McHale
    1.  Parish
...

you’d get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don’t have to.

Re:Why Markdown Sucks (2016) by intertextuality on Thursday April 25, 2019 @06:46AM (#19746747)
Although not exactly aesthetically pleasing, I actually prefer the 1. 1. 1. layout. Why? Because when you write something it's common to revise and re-order things. A lot. Having 1. 2. 3. means I'd have to go and fix the rest of the list.

I see 1. 1. 1. like appending commas to every field in a struct declaration or an object constructor. It allows me to go back and arbitrarily move things around.

Re:Why Markdown Sucks (2016) by enriquto on Thursday April 25, 2019 @06:42AM (#19746727)
Notice that in HTML5 you do not need to close the li tags
Re:Why Markdown Sucks (2016) by zimpenfish on Thursday April 25, 2019 @06:01AM (#19746538)
You can use "1." for all items in a numbered list.

https://i.imgur.com/VEYqLWE.png

    rjp$ diff -u test.md test-notesla.md 
    --- test.md     2019-04-25 10:58:23.000000000 +0100
    +++ test-notesla.md     2019-04-25 10:59:03.000000000 +0100
    @@ -1,4 +1,3 @@
     1. Nissan
    -1. Tesla
     1. BYD
Re:Why Markdown Sucks (2016) by masklinn on Thursday April 25, 2019 @06:34AM (#19746681)
> To (god forbid!) remove Tesla, you have to write

You don't actually have to do that, markdown will convert numbered lists to an HTML ordered list, the numbers are just numbered list markers and otherwise ignored: https://hackmd.io/EVPo3hJpQBenp08uy4ZEuA

This behaviour is usually annoying.

reStructuredText supports "#" as a numbered list sigil (as well as various numeral styles e.g. roman or alphabetic). It also supports a custom start, however if the list is explicitly numbered it does not support "holes" e.g. 3 4 5 is fine (and will keep this numbering in the output), 2 3 5 is not.