Tweak denote-org-extras--get-outline to only ever get useful regexp for the outline

This commit is contained in:
Protesilaos Stavrou 2024-12-06 12:48:06 +02:00
parent d6e94118da
commit 392f6ebe77
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -36,7 +36,7 @@
(defun denote-org-extras--get-outline (file)
"Return `outline-regexp' headings and line numbers of FILE."
(with-current-buffer (find-file-noselect file)
(let ((outline-regexp (format "^\\(?:%s\\)" (or (bound-and-true-p outline-regexp) "[*\^L]+")))
(let ((outline-regexp (format "^\\(?:%s\\)" (or (bound-and-true-p outline-regexp) "\\*+ ")))
candidates)
(save-excursion
(goto-char (point-min))