1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 14:27:59 +01:00

fixed :open google.com opening google for searching ".com"

This commit is contained in:
Martin Stubenschrott
2007-05-02 12:47:30 +00:00
parent e52f7ffda8
commit 06bf4d63d4
2 changed files with 5 additions and 3 deletions

View File

@@ -1313,13 +1313,13 @@ function stringToURLs(str)
}*/
// first check if the first word is a search engine
var matches = urls[url].match(/^\s*(\w+)\s*(.*)/);
var matches = urls[url].match(/^\s*(\w+)(\s+|$)(.*)/);
var alias = null;
var text = null;
if (matches && matches[1])
alias = matches[1];
if (matches && matches[2])
text = matches[2];
if (matches && matches[3] && matches[3].length >= 1)
text = matches[3];
if (alias)
{