forked from mirrors/org-mode
org-element: Fix table and table.el mix
* lisp/org-element.el (org-element-table-parser): Properly parse an Org table followed by a line starting with a "+". * testing/lisp/test-org-element.el (test-org-element/context): Fix test.
This commit is contained in:
parent
f03d96572e
commit
106ca75307
|
@ -2493,9 +2493,11 @@ Assume point is at the beginning of the table."
|
|||
(let* ((case-fold-search t)
|
||||
(table-begin (point))
|
||||
(type (if (looking-at "[ \t]*|") 'org 'table.el))
|
||||
(end-re (format "^[ \t]*\\($\\|[^| \t%s]\\)"
|
||||
(if (eq type 'org) "" "+")))
|
||||
(begin (car affiliated))
|
||||
(table-end
|
||||
(if (re-search-forward org-table-any-border-regexp limit 'm)
|
||||
(if (re-search-forward end-re limit 'move)
|
||||
(goto-char (match-beginning 0))
|
||||
(point)))
|
||||
(tblfm (let (acc)
|
||||
|
@ -2560,7 +2562,7 @@ containing `:begin', `:end', `:contents-begin', `:contents-end',
|
|||
(end-of-line)
|
||||
(skip-chars-backward " \t")
|
||||
(point))))
|
||||
(end (progn (forward-line) (point))))
|
||||
(end (line-beginning-position 2)))
|
||||
(list 'table-row
|
||||
(list :type type
|
||||
:begin begin
|
||||
|
|
|
@ -3330,8 +3330,7 @@ Text
|
|||
;; Do not find objects in table rules.
|
||||
(should
|
||||
(eq 'table-row
|
||||
(org-test-with-temp-text "| a | b |\n+---+---+\n| c | d |"
|
||||
(forward-line)
|
||||
(org-test-with-temp-text "| a | b |\n|-<point>--|---|\n| c | d |"
|
||||
(org-element-type (org-element-context)))))
|
||||
;; Find objects in parsed affiliated keywords.
|
||||
(should
|
||||
|
|
Loading…
Reference in a new issue