Browse Source

org-element: Use correct regexp to identify comments at column 0

* contrib/lisp/org-element.el (org-element-guess-type,
org-element-current-element): Use correct regexp to identify comments
at column 0.
Nicolas Goaziou 13 years ago
parent
commit
3bace4b335
1 changed files with 2 additions and 2 deletions
  1. 2 2
      contrib/lisp/org-element.el

+ 2 - 2
contrib/lisp/org-element.el

@@ -2770,7 +2770,7 @@ point is in a section in priority."
 			"^[ \t]*#\\+end:\\(?:\\s-\\|$\\)")))
 	(if (not completep) 'paragraph
 	  (goto-char (car completep)) 'dynamic-block)))
-     ((looking-at "\\(#\\|[ \t]*#\\+\\)\\(?: \\|$\\)") 'comment)
+     ((looking-at "\\(#\\|[ \t]*#\\+\\(?: \\|$\\)\\)") 'comment)
      ((looking-at "[ \t]*-\\{5,\\}[ \t]*$") 'horizontal-rule)
      ((org-at-table-p t) 'table)
      ((looking-at "[ \t]*#\\+tblfm:")
@@ -3279,7 +3279,7 @@ more restrictive."
             (org-element-dynamic-block-parser)
           (org-element-paragraph-parser)))
        ;; Comment.
-       ((looking-at "\\(#\\|[ \t]*#\\+\\)\\(?: \\|$\\)")
+       ((looking-at "\\(#\\|[ \t]*#\\+\\(?: \\|$\\)\\)")
 	(org-element-comment-parser))
        ;; Horizontal rule.
        ((looking-at "[ \t]*-\\{5,\\}[ \t]*$")