mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 05:17:58 +01:00
Skip leading white space when proto matching.
--HG-- extra : rebase_source : ad2bc00283827198b0cab54400a1c1b8d323a7a3
This commit is contained in:
@@ -2312,7 +2312,7 @@ var Buffer = Module("Buffer", {
|
|||||||
let url = dactyl.clipboardRead();
|
let url = dactyl.clipboardRead();
|
||||||
dactyl.assert(url, _("error.clipboardEmpty"));
|
dactyl.assert(url, _("error.clipboardEmpty"));
|
||||||
|
|
||||||
let proto = /^([-\w]+):/.exec(url);
|
let proto = /^\s*([-\w]+):/.exec(url);
|
||||||
if (proto && services.PROTOCOL + proto[1] in Cc && !RegExp(options["urlseparator"]).test(url))
|
if (proto && services.PROTOCOL + proto[1] in Cc && !RegExp(options["urlseparator"]).test(url))
|
||||||
return url.replace(/\s+/g, "");
|
return url.replace(/\s+/g, "");
|
||||||
return url;
|
return url;
|
||||||
|
|||||||
Reference in New Issue
Block a user