Coder Social home page Coder Social logo

Comments (3)

mattcone avatar mattcone commented on July 26, 2024 1

Open to suggestions on this one.

FWIW, I do think the "How Does it Work?" section needs some revision. I'm also planning on adding an entire "Extended Syntax" section with information about the various lightweight markdown languages. But I don't know... maybe the markdown languages need a shoutout earlier in the guide.

from markdown-guide.

mattcone avatar mattcone commented on July 26, 2024

Thanks for raising this as an issue! My (admittedly limited) understanding is that this is kind of a gray area. Gruber himself noted in his original design document that it's a good idea to start with the number one:

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.

Sure enough, the Bablefish 2 tool reveals that a number of Markdown implementations start the list with the first number used. Take the following list for example:

4. hi
9. hello
1. hey

You can see the results here. CommonMark and several other implementations start the list with the <ol start="4"> tag, which means the list will start with the number four. I tested this in Dillinger (which uses a CommonMark implementation), and the list does start with the number four. The other implementations still start the list at number one.

Very confusing!

I'm not quite sure how to communicate stuff like this. I'm working on a troubleshooting section, but there are so many gray areas like this that it's probably impossible to note them all.

In this particular case, my personal opinion is that if you want the list to start with the number one, you should start the list with the number one. It's not required for all implementations, but it's a best practice that can prevent unexpected issues down the road if you move your Markdown files into another application.

from markdown-guide.

gaylin avatar gaylin commented on July 26, 2024

Actually I think it would be immensely useful to have a gray area information section even if it's only to show the most troublesome things people run into. If the list started to get obscenely long, I suppose it could always get moved to another page or something. But even if it only focused on the chief offenders for the time being, I think it would be of use.

What about keeping the comment as is right now, and then when the troubleshooting or "gray area" is created, place it at the bottom of the guide and link inline to it? Something like this...

The numbers don’t have to be in numerical order, but the list should start with the number one
(though read more about gray areas when formatting numbered lists).

from markdown-guide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.