Skip to content

Commit

Permalink
refact: using pcase instead of if
Browse files Browse the repository at this point in the history
  • Loading branch information
OZoneGuy committed Jan 8, 2024
1 parent 6ec7323 commit fb29106
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions org-ql-search.el
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ this (must be a single line in the Org buffer):
(cons 'heading (lambda (element)
(let ((normalized-heading
(org-ql-search--link-heading-search-string (org-element-property :raw-value element))))
(if not-links
normalized-heading
(org-ql-search--org-make-link-string normalized-heading (org-link-display-format normalized-heading))))))
(pcase links
(t (org-ql-search--org-make-link-string normalized-heading (org-link-display-format normalized-heading)))
(nil normalized-heading)))))
(cons 'priority (lambda (element)
(--when-let (org-element-property :priority element)
(char-to-string it))))
Expand Down

0 comments on commit fb29106

Please sign in to comment.