-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use correct marker from previous list level
Putting the point after "AAA" in the following sample and pressing `C-u` `M-RET` should insert "*" (properly dedented) instead of "1.". ``` 1. A * AA 1. AAA ``` It should produce: ``` 1. A * AA 1. AAA * ``` Previously, it produced this instead: ``` 1. A * AA 1. AAA 1. ``` This commit changes the behavior of `(markdown-prev-list-item level)`. It now stops at list items with (non-list-marker) indentation at or *below* `level`. In the example above, the (non-list-marker) indentation of "AAA" is 11. Subtracting 4 gives 7, but the corresponding indentation of the previous item "AA" is only 6. So, when mixing list types it does not suffice to simply subtract 4 and look for equal indentation. Instead, we subtract 1 and find the previous item with *lesser than or equal* indentation. Closes #4
- Loading branch information
Showing
2 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters