File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 13
13
- ` markdown-export ` should not output stderr content to output file
14
14
- Hide wikilink markup as part of ` markdown-toggle-markup-hiding ` [ GH-847 ] [ ]
15
15
- Angle URL fontify issue which was introduced by [ GH-861 ] [ ] [ GH-895 ] [ ]
16
+ - Fix list item bound calculation when tab indentation is used [ GH-904 ] [ ]
16
17
17
18
* Improvements:
18
19
- Support drag and drop features on Windows and multiple files' drag and drop
25
26
[ gh-882 ] : https://github.com/jrblevin/markdown-mode/issues/882
26
27
[ gh-891 ] : https://github.com/jrblevin/markdown-mode/issues/891
27
28
[ gh-895 ] : https://github.com/jrblevin/markdown-mode/issues/895
29
+ [ gh-904 ] : https://github.com/jrblevin/markdown-mode/issues/904
28
30
29
31
# Markdown Mode 2.7
30
32
Original file line number Diff line number Diff line change @@ -2612,7 +2612,11 @@ Return the point at the end when a list item was found at the
2612
2612
original point. If the point is not in a list item, do nothing."
2613
2613
(let (indent)
2614
2614
(forward-line)
2615
- (setq indent (current-indentation))
2615
+ ;; #904 consider a space indentation and tab indentation case
2616
+ (save-excursion
2617
+ (let ((pos (point)))
2618
+ (back-to-indentation)
2619
+ (setq indent (- (point) pos))))
2616
2620
(while
2617
2621
(cond
2618
2622
;; Stop at end of the buffer.
Original file line number Diff line number Diff line change @@ -4595,6 +4595,25 @@ puts 'hello, world'
4595
4595
(forward-line)
4596
4596
(should (markdown-cur-list-item-bounds))))
4597
4597
4598
+ (ert-deftest test-markdown-lists/bounds-3 ()
4599
+ "Function `markdown-cur-list-item-bounds' with tab indentations.
4600
+ Detail: https://github.com/jrblevin/markdown-mode/issues/904"
4601
+ ;; tab indentation
4602
+ (markdown-test-string "- item
4603
+ \t- subitem1
4604
+ \t- subitem2"
4605
+ (forward-line)
4606
+ (let ((bounds (markdown-cur-list-item-bounds)))
4607
+ (should (= (nth 1 bounds) 19))))
4608
+
4609
+ ;; space indentation
4610
+ (markdown-test-string "- item
4611
+ - subitem1
4612
+ - subitem2"
4613
+ (forward-line)
4614
+ (let ((bounds (markdown-cur-list-item-bounds)))
4615
+ (should (= (nth 1 bounds) 22)))))
4616
+
4598
4617
(ert-deftest test-markdown-lists/bounds-prev ()
4599
4618
"Test list item bounds function `markdown-prev-list-item-bounds'."
4600
4619
(markdown-test-file "lists.text"
You can’t perform that action at this time.
0 commit comments