fix doi.org url handling

pull/2/head
Alpha Chen 2 years ago
parent 8cccbf1226
commit f316439bda
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -28,10 +28,10 @@
(fn open-with [app] (fn open-with [app]
(partial open-url app)) (partial open-url app))
;; fnlfmt: skip
(local default-handlers (local default-handlers
[["^https://.*%.?zoom.us/j/%d+" (open-with :zoom)] [["^https://.*%.?zoom.us/j/%d+" (open-with :zoom)]
["^https://doi.org/" ["^https://doi.org/" #((open-with :default) (.. "https://sci-hub.st/" $1))]])
#(open-with :default (.. "https://sci-hub.st/" $1))]])
(fn url->handler [url] (fn url->handler [url]
(accumulate [acc nil _ [pat handler] (ipairs handlers) &until acc] (accumulate [acc nil _ [pat handler] (ipairs handlers) &until acc]

Loading…
Cancel
Save