-
Notifications
You must be signed in to change notification settings - Fork 13
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
Inserting list items #107
Comments
Hmmn, actually is this a bug? When checking the example on the documentation page, it makes no mention of this being an actual feature, also If you did see a mention of this somewhere, can you point me to the place where you found it? I do recall adding some code to the enter-handler to prevent it from adding list markers when pressing enter and not being at the end of the line though. I do not know anymore why exactly it was done. I guess you would like to propose some new behavior here, the enter handler is a really complex function already though, and making changes there is like trying to step through a minefield 😅 Alternatively, isn't it easier to |
Actually I did not search the documentation. I just thought it will be normal to have the same behavior in creating a new list item by splitting a line. To solve it I do just insert and |
Makes sense indeed, this is something that word will happily do for you as well, but please do mind that unsupported behavior isn't a bug but rather a feature request :) When I think of the word bug I immediately jump to "some existing functionality is broken" 😅 As for this request, I'll mark it as a feature request and see what I can do, it could be easier than thought, but could also be a nightmare to implement. Like I mentioned in the other reopened issue, it may take some time here as well. Any case it's good feedback, cheers as usual 👍 |
Please take your time. There is no hurry. I know that you make this in your free time and it amazing that you are offering such a nice plugin. My logic in considering this as a bug was that "splitting" a line in an ordered/bullet list is not different than just adding a new empty one and I thought it makes sense to have the same behavior (adding a bullet or a number to the line empty or not, in my case). |
I can understand the reasoning behind you thinking this being a bug because it doesn't seem like a separate use-case indeed. In this case though, checking the docs and seeing if it is supposed to work will make it clear if something is actively implemented and not working, or if it should be a new feature. To me it seemed a bit quick to jump to the conclusion of marking it as a bug without checking the docs, I put a lot of effort into writing those to make sense as well and it only takes a few clicks to find the right documentation for any feature when you're in doubt :) Point well taken though, but as a feature request rather than a bug 👌 |
Hmmn @samarulmeu I did indeed write tests to check explicitly that it would not do what you showed, but, after disabling the check to make sure enter is pressed at the end of the line, I see proper results one would expect when pressing enter in the middle. My initial reasoning for this is beyond me since it has been quite a while since I initially wrote this functionality, but I believe always allowing it will actually not break anything 🤔 All other tests pass as well so I think I can safely enable this functionality, I'll update the tests to support this new behavior, you might see this land sooner than expected. |
Can you update mkdx and check to see if this is indeed the desired behavior? |
Thank you so much! That is just perfect! And I promise that I will not bother you this week as you've mentioned you have work to do. And to clarify --- it was strange for me that this was not supported as I saw it as part of the list auto-formatting, that's why the bug thing. Have a great evening! I'm closing this now. |
Haha I understand, it beats me why it worked that way but I think it will just be more useful now. Feel free to open issues is you find em, if I can't process them they will remain open for a bit longer is all :) This one happened to be way easier to fix than I imagined (I went through some nightmares in the past with the enter handler hehe) so that was a nice twist :) You have a great evening too! 👍 👋 |
There is a bug in creating a new items for both types of list (bullet and ordered). If you are at the end of the line and you press enter a new item is created, but if you are inside a line and press enter the remaining characters/words do not make a new item list.
Example:
I get
instead of
The text was updated successfully, but these errors were encountered: