Skip to content

Commit

Permalink
Deps bump + CS update
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Puzrin committed Nov 27, 2018
1 parent bb7b5ce commit 9b558d4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Expand Up @@ -32,7 +32,7 @@ rules:
handle-callback-err: 2

# Postponed
indent: [ 2, 2, { VariableDeclarator: { var: 2, let: 2, const: 3 }, SwitchCase: 1 } ]
indent: [ 2, 2, { VariableDeclarator: { var: 2, let: 2, const: 3 }, SwitchCase: 1, ignoreComments: true, MemberExpression: off } ]

# key-spacing: [ 2, { "align": "value" } ]
keyword-spacing: 2
Expand Down
9 changes: 4 additions & 5 deletions index.js
Expand Up @@ -257,11 +257,10 @@ function compile(self) {
self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');
self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');

self.re.pretest = RegExp(
'(' + self.re.schema_test.source + ')|' +
'(' + self.re.host_fuzzy_test.source + ')|' +
'@',
'i');
self.re.pretest = RegExp(
'(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',
'i'
);

//
// Cleanup
Expand Down
2 changes: 1 addition & 1 deletion lib/re.js
Expand Up @@ -64,7 +64,7 @@ module.exports = function (opts) {
'\\.(?!' + re.src_ZCc + '|[.]).|' +
(opts && opts['---'] ?
'\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate
:
:
'\\-+|'
) +
'\\,(?!' + re.src_ZCc + ').|' + // allow `,,,` in paths
Expand Down
14 changes: 7 additions & 7 deletions package.json
Expand Up @@ -22,16 +22,16 @@
},
"devDependencies": {
"ansi": "^0.3.0",
"autoprefixer-stylus": "^0.11.0",
"autoprefixer-stylus": "^0.14.0",
"benchmark": "^2.1.0",
"browserify": "*",
"chai": "^3.5.0",
"coveralls": "^2.11.2",
"browserify": "^16.2.3",
"chai": "^4.2.0",
"coveralls": "^3.0.2",
"eslint": "^5.9.0",
"istanbul": "^0.4.5",
"jade": "^1.11.0",
"eslint": "^3.8.0",
"istanbul": "*",
"mdurl": "^1.0.0",
"mocha": "^3.1.2",
"mocha": "^5.2.0",
"ndoc": "^5.0.1",
"stylus": "~0.54.5",
"tlds": "^1.166.0"
Expand Down
13 changes: 5 additions & 8 deletions support/tlds_2char_gen.js
Expand Up @@ -8,6 +8,7 @@


/*eslint-disable no-console*/
/*eslint-env es6*/

function toRanges(str) {
var ranges = [], i;
Expand All @@ -30,20 +31,16 @@ function toRanges(str) {
return '[' + ranges.join('') + ']';
}

var tlds = require('tlds')
.filter(function (name) {
return /^[a-z]{2}$/.test(name);
})
.sort();
var tlds = require('tlds').filter(name => /^[a-z]{2}$/.test(name)).sort();

//
// group by first letter
//

var result = [];

'abcdefghijklmnopqrstuvwxyz'.split('').forEach(function (letter) {
var list = tlds.filter(function (name) { return name[0] === letter; });
'abcdefghijklmnopqrstuvwxyz'.split('').forEach(letter => {
var list = tlds.filter(name => name[0] === letter);

if (!list.length) { return; }

Expand All @@ -52,7 +49,7 @@ var result = [];
return;
}

result.push(letter + '[' + list.map(function (n) { return n[1]; }).join('') + ']');
result.push(letter + '[' + list.map(n => n[1]).join('') + ']');
});

result = result.join('|');
Expand Down
4 changes: 2 additions & 2 deletions test/test.js
Expand Up @@ -69,8 +69,8 @@ describe('not links', function () {

it('line ' + (idx + 1), function () {
assert.notOk(l.test(line),
'(should not find link in `' + line + '`, but found `' +
JSON.stringify((l.match(line) || [])[0]) + '`)');
'(should not find link in `' + line + '`, but found `' +
JSON.stringify((l.match(line) || [])[0]) + '`)');
});
});

Expand Down

0 comments on commit 9b558d4

Please sign in to comment.