mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 00:57:59 +01:00
whitespace formatting fixes
This commit is contained in:
@@ -27,7 +27,7 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
}}} ***** END LICENSE BLOCK *****/
|
||||
|
||||
vimperator.util = {
|
||||
escapeHTML: function(str)
|
||||
escapeHTML: function (str)
|
||||
{
|
||||
// XXX: the following code is _much_ slower than a simple .replace()
|
||||
// :history display went down from 2 to 1 second after changing
|
||||
@@ -41,7 +41,7 @@ vimperator.util = {
|
||||
// TODO: use :highlight color groups
|
||||
// if "process_strings" is true, any passed strings will be surrounded by " and
|
||||
// any line breaks are displayed as \n
|
||||
colorize: function(arg, process_strings)
|
||||
colorize: function (arg, process_strings)
|
||||
{
|
||||
var type = typeof(arg);
|
||||
|
||||
@@ -83,7 +83,7 @@ vimperator.util = {
|
||||
|
||||
// takes a string like 'google bla, www.osnews.com'
|
||||
// and returns an array ['www.google.com/search?q=bla', 'www.osnews.com']
|
||||
stringToURLArray: function(str)
|
||||
stringToURLArray: function (str)
|
||||
{
|
||||
var urls = str.split(/\s*\,\s+/);
|
||||
|
||||
@@ -158,7 +158,7 @@ vimperator.util = {
|
||||
return urls;
|
||||
},
|
||||
|
||||
highlightURL: function(str, force)
|
||||
highlightURL: function (str, force)
|
||||
{
|
||||
if (force || /^[a-zA-Z]+:\/\/.*\//.test(str))
|
||||
return "<a class='hl-URL' href='" + str + "'>" + vimperator.util.escapeHTML(str) + "</a>";
|
||||
@@ -166,7 +166,7 @@ vimperator.util = {
|
||||
return str;
|
||||
},
|
||||
|
||||
formatNumber: function(num)
|
||||
formatNumber: function (num)
|
||||
{
|
||||
var strNum = (num + "").split(".", 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user