obsidian-linter icon indicating copy to clipboard operation
obsidian-linter copied to clipboard

FR: Allow for Automatically Numbering Ordered Lists

Open chrisgrieser opened this issue 3 years ago • 1 comments
trafficstars

Screenshot 2021-12-28 00 33 20

When editing numbered lists, the numbering is often off. It would be great to autofix this. Afair, markdown linters have this, so probably this isn't something we would have to implement ourselves?

chrisgrieser avatar Dec 27 '21 23:12 chrisgrieser

Or maybe just use 1. for all items (like so: https://github.com/google/styleguide/blob/gh-pages/docguide/style.md#use-lazy-numbering-for-long-lists=)?

harmtemolder avatar Apr 20 '22 09:04 harmtemolder

It has been a while since I took a look at this. Since it has been requested several times, I will go ahead and see about adding this functionality. I know I definitely would find ti useful, I just have to test for a couple of edge cases. Hopefully do this and a couple other changes will buy me some time to finish the UI changes.

pjkaufman avatar Sep 16 '22 21:09 pjkaufman

Note that you might simply sherlock the feature from the Markdown prettifier plugin. Since the dev literally said they are no longer using it themselves, since they use the linter plugin, I doubt they won't object 😆

Pasted image 2022-09-16 23 24 03

see also https://github.com/cristianvasquez/obsidian-prettify/issues/96

chrisgrieser avatar Sep 16 '22 21:09 chrisgrieser

The problem is I don't see where they were doing that. It may be a dependency they used which I would not easily be able to use if it were a prettifier.

pjkaufman avatar Sep 16 '22 22:09 pjkaufman

I think I have something. It is not necessarily going to be link emphasis and bold were as they are a little different of a cookie to crack. They act differently in how you would determine the consistent option, so I will leave that off unless it is expressly asked. However it will format it as either a lazy or ascending numeric number. It will also allow you to end the list item indicator with a period or parenthesis.

pjkaufman avatar Sep 17 '22 01:09 pjkaufman

This change should be included in the next release. If there is a desire to have the option consistent added to either of the options please open another issue indicating that that is the case. Please let us know if the changes on master or in the next release do not satisfy this feature request.

pjkaufman avatar Sep 17 '22 01:09 pjkaufman