diff --git a/lib/hexo/index.js b/lib/hexo/index.js index 2a970b3a3f..f4c30c3afe 100644 --- a/lib/hexo/index.js +++ b/lib/hexo/index.js @@ -89,8 +89,8 @@ function Hexo(base, args) { path: pathFn.join(base, 'db.json') }); -this.config_path = args.config ? mcp(base, args.config) - : pathFn.join(base, '_config.yml'); + this.config_path = args.config ? mcp(base, args.config) : + pathFn.join(base, '_config.yml'); registerModels(this); @@ -224,8 +224,8 @@ Hexo.prototype.loadPlugin = function(path, callback) { require.extensions = Module._extensions; require.cache = Module._cache; - script = '(function(exports, require, module, __filename, __dirname, hexo){' - + script + '});'; + script = '(function(exports, require, module, __filename, __dirname, hexo){' + + script + '});'; var fn = vm.runInThisContext(script, path); diff --git a/lib/hexo/multi_config_path.js b/lib/hexo/multi_config_path.js index 6245752bcb..cea53a7862 100644 --- a/lib/hexo/multi_config_path.js +++ b/lib/hexo/multi_config_path.js @@ -53,8 +53,8 @@ module.exports = function(ctx) { deepAssign(combinedConfig, yml.safeLoad(file, {json: true})); count++; } else { - log.w('Config file ' + paths[i] - + ' not supported type.'); + log.w('Config file ' + paths[i] + + ' not supported type.'); } } diff --git a/lib/plugins/helper/paginator.js b/lib/plugins/helper/paginator.js index 8979666bd2..689ba8d95a 100644 --- a/lib/plugins/helper/paginator.js +++ b/lib/plugins/helper/paginator.js @@ -20,18 +20,18 @@ function paginatorHelper(options) { if (!current) return ''; - var currentPage = '' - + (transform ? transform(current) : current) - + ''; + var currentPage = '' + + (transform ? transform(current) : current) + + ''; function link(i) { return self.url_for(i === 1 ? base : base + format.replace('%d', i)); } function pageLink(i) { - return '' - + (transform ? transform(i) : i) - + ''; + return '' + + (transform ? transform(i) : i) + + ''; } // Display the link to the previous page diff --git a/lib/plugins/helper/search_form.js b/lib/plugins/helper/search_form.js index 854dd15dd4..941db0ed09 100644 --- a/lib/plugins/helper/search_form.js +++ b/lib/plugins/helper/search_form.js @@ -8,11 +8,11 @@ function searchFormHelper(options) { var text = options.hasOwnProperty('text') ? options.text : 'Search'; var button = options.button; - return '
' - + '' - + (button ? '' : '') - + '' - + '
'; + return '
' + + '' + + (button ? '' : '') + + '' + + '
'; } module.exports = searchFormHelper; diff --git a/lib/plugins/helper/tagcloud.js b/lib/plugins/helper/tagcloud.js index 3c328c8712..10a35b3022 100644 --- a/lib/plugins/helper/tagcloud.js +++ b/lib/plugins/helper/tagcloud.js @@ -224,9 +224,9 @@ function tagcloudHelper(tags, options) { } result.push( - '' - + (transform ? transform(tag.name) : tag.name) - + '' + '' + + (transform ? transform(tag.name) : tag.name) + + '' ); }); @@ -245,10 +245,10 @@ function Color(color) { throw new TypeError('color is required!'); } - if (this.r < 0 || this.r > 255 - || this.g < 0 || this.g > 255 - || this.b < 0 || this.b > 255 - || this.a < 0 || this.a > 1) { + if (this.r < 0 || this.r > 255 || + this.g < 0 || this.g > 255 || + this.b < 0 || this.b > 255 || + this.a < 0 || this.a > 1) { throw new Error(color + ' is invalid.'); } }