File tree 4 files changed +17
-100
lines changed
4 files changed +17
-100
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class Word extends Node {
37
37
const { value } = lastNode ;
38
38
lastNode . isColor = colorRegex . test ( value ) || colorNames . includes ( value . toLowerCase ( ) ) ;
39
39
lastNode . isHex = hexRegex . test ( value ) ;
40
- lastNode . isUrl = isUrl ( value ) ;
40
+ lastNode . isUrl = value . startsWith ( '//' ) ? isUrl ( `http: ${ value } ` ) : isUrl ( value ) ;
41
41
lastNode . isVariable = Word . testVariable ( tokens [ 0 ] , parser ) ;
42
42
}
43
43
Original file line number Diff line number Diff line change 14
14
"main" : " lib/index.js" ,
15
15
"types" : " lib/index.d.ts" ,
16
16
"engines" : {
17
- "node" : " >=6.14.4 "
17
+ "node" : " >=10 "
18
18
},
19
19
"scripts" : {
20
20
"ci:coverage" : " nyc npm run test && nyc report --reporter=text-lcov > coverage.lcov" ,
31
31
],
32
32
"dependencies" : {
33
33
"color-name" : " ^1.1.4" ,
34
- "is-url-superb" : " ^3.0.0" ,
35
- "postcss" : " ^7.0.5" ,
36
- "url-regex" : " ^5.0.0"
34
+ "is-url-superb" : " ^4.0.0" ,
35
+ "postcss" : " ^7.0.5"
37
36
},
38
37
"devDependencies" : {
39
38
"ava" : " ^3.5.1" ,
44
43
"nyc" : " ^15.0.0" ,
45
44
"perfy" : " ^1.1.5" ,
46
45
"postcss-value-parser" : " ^4.0.0" ,
47
- "postcss-values-parser" : " ^3.0.3" ,
48
46
"pre-commit" : " ^1.2.2" ,
49
47
"prettier" : " ^2.0.1" ,
50
48
"strip-ansi" : " ^6.0.0" ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const chalk = require('chalk');
5
5
const globby = require ( 'globby' ) ;
6
6
const perfy = require ( 'perfy' ) ;
7
7
const valueParser = require ( 'postcss-value-parser' ) ;
8
- const v2Parser = require ( 'postcss-values-parser' ) ;
8
+
9
9
const strip = require ( 'strip-ansi' ) ;
10
10
const table = require ( 'text-table' ) ;
11
11
@@ -39,14 +39,6 @@ const { parse } = require('../');
39
39
theirs = { milliseconds : NaN } ;
40
40
}
41
41
42
- perfy . start ( 'v2' ) ;
43
- try {
44
- v2Parser ( test ) . parse ( ) ;
45
- v2 = perfy . end ( 'v2' ) ;
46
- } catch ( e ) {
47
- v2 = { milliseconds : NaN } ;
48
- }
49
-
50
42
results . push ( {
51
43
test,
52
44
ours : ours . milliseconds ,
You can’t perform that action at this time.
0 commit comments