From 332da69b3c3ca222943728c20287e4ace6d40e61 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 5 Jan 2021 18:06:31 +0100 Subject: [PATCH] element: Fix table.el parsing... again! * lisp/org-element.el (org-element--current-element): Properly parse table.el tables ending at limit. Reported-by: Kaushal Modi --- lisp/org-element.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index f0984797a..0f0e01e8a 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -3971,7 +3971,7 @@ element it has to parse." (cond ;; Must end with a full rule. ((not (re-search-forward non-table.el-line limit 'move)) - (beginning-of-line) + (if (bolp) (forward-line -1) (beginning-of-line)) (looking-at rule-regexp)) ;; Ignore pseudo-tables with a single ;; rule.