Closed wilmoore closed 10 years ago
I’m not sure about that, an empty list item it’s useless so an <Enter>
on an empty list item will remove it instead of leave the list item empty and create another one below
In this case you are quoting some text and an empty line it’s perfectly fine. How would you insert something like
A line of text
A line of text
? What do you think?
quoting some text and an empty line it’s perfectly fine...
Hmmm...you do have a point. I think perhaps it would be nice to make it configurable, that way, for people like me, there is an option to set a good personal default. In fact, if I wanted to write the above example text with the empty line in between, since it isn't my default way of writing, I'd be OK writing it as shown in the below demo (press o or
FYI, I've added a new commit (and squashed) which adds an option.
I propose a slightly different implementation you can review in #14, let me know what do you think. With this you don’t have to duplicate regular expressions and the code is more truthful (isEmptyListItem
is only for list items and isEmptyQuote
is only for quotes)
I propose a slightly different implementation you can review in #14
Yes, I like your implementation better. I pulled down the code from the PR and tested. Everything looks good.
Thanks.
Adding
>
to thes:IsAnEmptyListItem
regular expression character list seems to fix the issue where hitting enter on an empty>
previously did not auto-end the quote.Here is a demo with the new optional setting (
g:markdown_drop_empty_blockquotes
):