Skip to content

Commit

Permalink
regex parsing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lanceberge committed Sep 7, 2024
1 parent a5354da commit 80a54ff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions elysium.el
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 80a54ff

Please sign in to comment.