Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions org-books.el
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,10 @@ Assumes it has one."
Return a list of three items: title (string), author (string) and
an alist of properties to be applied to the org entry. If the url
is not supported, throw an error."
(let ((output 'no-match))
(let ((output 'no-match)
(url-host-string (url-host (url-generic-parse-url url))))
(cl-dolist (pattern-fn-pair org-books-url-pattern-dispatches)
(when (s-matches? (car pattern-fn-pair) url)
(when (s-matches? (car pattern-fn-pair) url-host-string)
(setq output (funcall (cdr pattern-fn-pair) url))
(cl-return)))
(if (eq output 'no-match)
Expand Down