浏览代码

org-list: get correct structure with empty items

* lisp/org-list.el (org-list-full-item-re): when an item has only
  a bullet and no space after it, list structure would not be
  recognized correctly.
Nicolas Goaziou 13 年之前
父节点
当前提交
dfda5fc8b4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lisp/org-list.el

+ 2 - 2
lisp/org-list.el

@@ -385,9 +385,9 @@ specifically, type `block' is determined by the variable
 It depends on `org-empty-line-terminates-plain-lists'.")
 It depends on `org-empty-line-terminates-plain-lists'.")
 
 
 (defconst org-list-full-item-re
 (defconst org-list-full-item-re
-  (concat "^[ \t]*\\(\\(?:[-+*]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)[ \t]+\\)"
+  (concat "^[ \t]*\\(\\(?:[-+*]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)\\(?:[ \t]+\\|$\\)\\)"
 	  "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?"
 	  "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?"
-	  "\\(?:\\(\\[[ X-]\\]\\)[ \t]+\\)?"
+	  "\\(?:\\(\\[[ X-]\\]\\)\\(?:[ \t]+\\|$\\)\\)?"
 	  "\\(?:\\(.*\\)[ \t]+::\\(?:[ \t]+\\|$\\)\\)?")
 	  "\\(?:\\(.*\\)[ \t]+::\\(?:[ \t]+\\|$\\)\\)?")
   "Matches a list item and puts everything into groups:
   "Matches a list item and puts everything into groups:
 group 1: bullet
 group 1: bullet