fix: non http links are not supported with mod+l

This commit is contained in:
Tienson Qin
2022-10-18 09:30:13 +08:00
parent 2cb0c8f2a3
commit a234730c15

View File

@@ -136,8 +136,7 @@
(let [{:keys [selection-start selection-end format selection value edit-id input]} m
cur-pos (cursor/pos input)
empty-selection? (= selection-start selection-end)
selection-link? (and selection (or (util/starts-with? selection "http://")
(util/starts-with? selection "https://")))
selection-link? (and selection (gp-util/url? selection))
[content forward-pos] (cond
empty-selection?
(config/get-empty-link-and-forward-pos format)