News for hackers. Stuff that matters.
Re:GitHub satanically messing with Markdown – changes 666 to... by PhasmaFelis on Monday November 25, 2019 @10:20PM (#21635404)
> That's how Markdown is supposed to treat numbered lists.

Huh. Is there a some reason why that's not obviously, bafflingly obtuse?

(Kind of like how Markdown and HN won't allow you to single-space text except in a code block)

Re:GitHub satanically messing with Markdown – changes 666 to... by wolfgang42 on Monday November 25, 2019 @10:33PM (#21635454)
From the section Deimorz linked:

> 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.

However, the complete disregard for the actual numbers seems to have been for ease of implementation in markdown.pl (the original implementation, which is what this doc is describing). The next paragraph notes:

> If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number.

Re:GitHub satanically messing with Markdown – changes 666 to... by hunter2_ on Tuesday November 26, 2019 @12:13AM (#21635783)
> starting ordered lists at an arbitrary number

The solution would need to be not just that, but also letting every li be arbitrarily enumerated. And at that point it's not even an ol, it's a ul (from a machine perspective) where the author might happen to mimick an ol. Or just nothing structured at all -- which would probably be a net positive.

Re:GitHub satanically messing with Markdown – changes 666 to... by icegreentea2 on Tuesday November 26, 2019 @12:22AM (#21635820)
The underlying HTML <ol> element allows arbitrary values through the value tag.

One of the original selling points of Markdown (at least in Gruber's post) is that is "seamlessly integrates" with HTML, in that you are in principle able to mix and match Markdown and HTML and get predictable HTML output. I think it was that aspect of Markdown that let it be so... sloppy?

That aspect of Markdown seems to have fallen away with the rise of Markdown extensions and standards.

Re:GitHub satanically messing with Markdown – changes 666 to... by jrowley on Monday November 25, 2019 @10:30PM (#21635436)
It’s a really convenient property if you’re maintaining long lists since you can easily re-order items in a list without having to re-number each item.
Re:GitHub satanically messing with Markdown – changes 666 to... by saalweachter on Monday November 25, 2019 @10:41PM (#21635492)
Yeah, it's great for wikis. Less so for forums.
Re:GitHub satanically messing with Markdown – changes 666 to... by gibspaulding on Tuesday November 26, 2019 @10:34AM (#21639124)
It seems like for those situations it would be much nicer to just have something like \item in LaTeX. It's still readable in plaintext, but wouldn't break things.
Re:GitHub satanically messing with Markdown – changes 666 to... by PhasmaFelis on Tuesday November 26, 2019 @02:13PM (#21641568)
That's a perfectly reasonable use case that should be supported. But it should require explicit activation (a tag, etc). A formatting engine should not rewrite content unless told to explicitly.
Re:GitHub satanically messing with Markdown – changes 666 to... by paggle on Monday November 25, 2019 @11:43PM (#21635694)
The fact is that Markdown is not a very good design but became the standard. So this is just a cross one must bear.
Re:GitHub satanically messing with Markdown – changes 666 to... by skeoh on Monday November 25, 2019 @10:34PM (#21635458)
By single space do you mean using a line break instead of a new paragraph? Markdown does allow for this: https://daringfireball.net/projects/markdown/syntax#p
Re:GitHub satanically messing with Markdown – changes 666 to... by input_sh on Tuesday November 26, 2019 @01:50AM (#21636131)
Let's say you have a list with 50 items and want to add one item in between. Instead of updating all the indexes, you just type a number and Markdown does that for you.

In any case, it can be escaped by writing 1\. instead of 1.

Re:GitHub satanically messing with Markdown – changes 666 to... by Dylan16807 on Tuesday November 26, 2019 @02:40AM (#21636321)
I can't think of any reason I would want half my list indexes to be wrong in my source file.

I can think of plenty of reasons I would want to use auto-numbers while removing explicit numbers. But this is insane as a default behavior.

Re:GitHub satanically messing with Markdown – changes 666 to... by CarlRJ on Tuesday November 26, 2019 @11:21AM (#21639647)
> I can't think of any reason I would want half my list indexes to be wrong in my source file.

Agreed. The bit about "oh, well, it fixes mistakes if you rearrange items" falls in the astonishing (in a bad way) camp far too often. When you really meant to number the lines, "2, 4, 6, 8" and it "helpfully" changes this to "1, 2, 3, 4". Arguably it's bad also in a list that has been maintained over time and has out-of-sequence numbers, where the users are counting on the processor to renumber - now, if someone says to change item 37, is that the one numbered 37 in the rendered output, or in the source? Better to use a tool of some sort to physically renumber that section of the source document.

A better alternative for auto-renumbering would be to only have it kick in when the entire list all starts with "1. " and there's more than one line in the list (so "...meet me at<next line>1. Then we'll..." doesn't end up with a line being dragged into being a numbered list). Then, the repeated use of "1. " at the start of the line becomes a much more obvious indication that you want to numbered list.

Re:GitHub satanically messing with Markdown – changes 666 to... by chrisseaton on Tuesday November 26, 2019 @12:02AM (#21635752)
> won't allow you to single-space text except in a code block

Why do you want to single-space your text though?

Re:GitHub satanically messing with Markdown – changes 666 to... by PhasmaFelis on Tuesday November 26, 2019 @02:09PM (#21641533)
Because I want to present a list of items, or some reference URLs, or a poem, without tons of unnecessary white space.