-
-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MD029: any interest in zero_one_or_ordered? #1135
Comments
The existing mode "ordered" allows lists that increment from 0 or 1 - it seems like this is the behavior you are asking for? |
Hi @DavidAnson thank you for your time. Let me clarify: What I'm proposing is either 0. zero
0. indexed
0. lists
or
1. one
1. indexed
1. lists or 0. zero
0. indexed
0. lists
or
0. zero
1. indexed
2. lists
or
1. one
1. indexed
1. lists
or
1. one
2. indexed
3. lists Today I can do Collapsed, since you know what it does, but here in case you want the refresherWith 0. zero
0. indexed
0. lists with 1. one
1. indexed
1. lists with
and with
|
What's the motivation behind something like |
Well in this case, the standard I'm trying to require is "use the single number so that we can reorder things as we maintain this documentation; markdown will fix it for you". However, this is an Internal Developer Portal, so sometimes the documentation really should start with Potentially, this could even be opened up to use an object or an array instead of just MD029:
supported_formats:
- zero
- one
# - ordered or MD029:
supported_formats:
ordered: false
zero: true
one: true |
Maybe you can give an example of a list you would start at 0 instead of 1? |
Items in a Javascript array is a programming example. One I started using it for was the "you are here" moment that at the beginning of a run-book, which was "read all of the steps of this before starting", kinda like "please listen to the following options, as our menu options have changed". Not all processes require it, but I've found, for example, that sometimes a step might have to be redone if you didn't realize you needed the output at a later step, and this seemed to help. |
The "start with 0" scenario doesn't feel compelling to me. Any list meant for people should probably start at 1. For something like an array, a Markdown list starting at 0 doesn't feel like the right visual. I agree with your proposal above that an object with true/false properties for ordered/zero/one could express the possibilities well, but migrating to that from the current enumeration feels like it could easily confuse people due to the overlap. I'm happy to leave this issue open for others to find and maybe comment on, but I am not in favor of making changes for this at present. |
kk cool; the last question in my mind is if there is value in "just make it any one of the proper markdown OL formats" or if you'd rather keep it specific. |
The more permissive a rule becomes, the less value it has for enforcing consistency. I don't claim the current implementation is a perfect balance, but there have been very few requests over the years which makes me feel like it strikes a pretty good balance. |
I'm a big fan of how
one
andzero
work in markdown. I've come across a few situations wherezero
makes the most sense, even in projects that are usuallyone
-indexed. There doesn't seem to be either "anything is allowed if it's a valid OL in markdown" or "always use the index".Do you (or anyone else) have interest in having "something" that allows that?
Some possible ideas:
zero_or_one
index_or_ordered
orvalidate_only
: this is basically "any of the above"consistent
: I would really like to be able to mix zero & one in a document, and I'm not sure others would expect (Principle of least astonishment) or want that if they used this value, so maybe that's not an answer to my proposal.I'd be happy to contribute if you think it's worth it.
The text was updated successfully, but these errors were encountered: