jrblevin / markdown-mode

Emacs Markdown Mode
http://jblevins.org/projects/markdown-mode/
GNU General Public License v3.0
875 stars 160 forks source link

Fix markdown-enter-key doesn't delete empty checkbox list #786

Closed kuranari closed 11 months ago

kuranari commented 11 months ago

Description

I have updated markdown-enter-key to delete empty checkboxes. I think this action is better, similar to how GitHub's issue editor handles it.

Issue

Expected Behavior:

When pressing enter on an empty checkbox list, the list should be deleted.

Actual Behavior:

A new list with a checkbox is added to the next line.

Steps to Reproduce

When I pressed enter on an empty checkbox item (with the cursor located after the checkbox),

- [x] 

a new list item was added, resulting in the following:

- [x] 
- [ ]

Type of Change

Checklist

syohex commented 11 months ago

Thanks