From 80a54ff08b0d47499c8757d64fa361649d25bac1 Mon Sep 17 00:00:00 2001 From: lanceberge Date: Sat, 7 Sep 2024 11:52:01 -0400 Subject: [PATCH] regex parsing fixes --- elysium.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/elysium.el b/elysium.el index 51c4ba4..5af6d35 100644 --- a/elysium.el +++ b/elysium.el @@ -322,12 +322,11 @@ The query is expected to be after the last '* ' (org-mode) or (goto-char (point-max)) (let ((case-fold-search t) (heading-regex (if (derived-mode-p 'org-mode) - "^\\*+" + "^\\*\\*\\* " "^### "))) (when (re-search-backward heading-regex nil t) - (buffer-substring-no-properties - (line-beginning-position 2) ; Start from next line - (point-max))))))) + (let ((query-text (buffer-substring-no-properties (point) (point-max)))) + (string-trim query-text))))))) (defun elysium--ordinal (n) "Convert integer N to its ordinal string representation."