Closed Zettt closed 9 years ago
Also a problem for recipes where first item is 1/2 spoon of sugar
or something similar.
Hey, sorry about the delay (first notification slipped through the cracks). I'll have a look at tweaking the regex as soon as I can.
Any update, @pslobo? I just provided some improvements here and there, and I'd love to ship v2.3 before Christmas.
So this is a tricky one and I'm not entirely sure how you'd want to tackle it. Currently, we're matching the fist character in the clipboard to identify if this is already a list or not. If it uses *-+ then we consider it an unordered list. If it starts with a number, we consider this an ordered list.
In the example you gave, the fist item in the clipboard is a number, so it immediately considers this to be an ordered list (which it is not).
I could instead check every line, but that would defeat the point of this macro. (convert between list types and convert a paragraph to list). Is there a compromise you'd feel comfortable with?
Well, as far as I'm concerned, and looking at the Markdown syntax, it's an ordered/numbered list when it starts with 1. text
. Notice the space at the end. Is that something you can use here?
I agree that checking each line defeats the purpose.
Fixed as per https://github.com/Zettt/km-markdown-library/commit/620f6e3a767bc8257149bc17107f4a28a0185f85.
Thanks, @rjames86.
I have this list:
1.618 The Antikythera Mechanism
Which I'd like to turn into an unordered list, but it produces this as a result:
I hope @pslobo can help me with this. Please.