first commit

This commit is contained in:
2026-09-08 20:28:54 +08:00
commit 2ada8d3d5a
37380 changed files with 4886169 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
; EditorConfig is awesome: http://EditorConfig.org
; Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
charset = 'utf-8'
trim_trailing_whitespace = true
+28
View File
@@ -0,0 +1,28 @@
{
"node": true,
"maxparams": 5,
"maxdepth": 5,
"maxstatements": 40,
"maxcomplexity": 10,
"bitwise": false,
"boss" : false,
"curly": true,
"eqeqeq": true,
"forin": true,
"globalstrict": true,
"immed": true,
"indent": 4,
"latedef": "nofunc",
"laxcomma": true,
"loopfunc": true,
"nonew": true,
"multistr": true,
"newcap": true,
"quotmark": true,
"strict": true,
"trailing": true,
"undef": true,
"unused": true
}
+3
View File
@@ -0,0 +1,3 @@
language: node_js
node_js:
- '0.12.9'
+35
View File
@@ -0,0 +1,35 @@
0.1.0:
date: 2014-08-08
changes:
- Initial release.
0.1.1:
date: 2014-08-11
changes:
- Make regexps public.
- Fixed bug with URIs that contains ?#iefix. Normally urijs normalizes such urls and removes "?" part, but only in this exact syntax it is now preserved as is.
0.2.0:
date: 2014-08-12
changes:
- Added UrlHelper.getOriginalURI() method.
- Added UrlsHelper.getOriginalURIS() method.
- Added ImportHelper.getOriginalURI() method.
- Added ImportHelper.getOriginalMediaQuery() method.
- Added ImportHelper.getMediaQuery() method.
- Added ImportHelper.setMediaQuery() method.
0.3.0:
date: 2015-12-20
changes:
- Updated dependencies
0.3.1:
date: 2015-12-20
changes:
- Updated forgotten urijs references
0.3.2
date: 2017-08-31
changes:
- Resolved blank url() case https://github.com/iAdramelk/postcss-urlrewrite/issues/4#issuecomment-325940126
0.3.3
date: 2023-05-18
changes:
- Update urljs and minimatch
+22
View File
@@ -0,0 +1,22 @@
Copyright (c) 2014 Alexey Ivanov
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+148
View File
@@ -0,0 +1,148 @@
## postcss-helpers [![Build Status](https://secure.travis-ci.org/iAdramelk/postcss-helpers.png)](https://travis-ci.org/iAdramelk/postcss-helpers)
> Some general purpose helpers for PostCSS, created to make working with url() and @import values more easy. Can be used without PostCSS.
### Getting Started
```shell
npm install postcss-helpers
```
### Helpers
#### #createUrlsHelper( rule )
Returns new UrlsHelper object from the rule string with one or more url() (see description below).
#### #createImportHelper( rule )
Returns new ImportHelper object from the @import value string (see description below).
### new UrlsHelper( rule )
Object for manipulating values of rules with one or multiple url().
#### #getOriginalRule
Returns original rule that it was created with.
#### #getOriginalURIS
Returns Array of all original URI in string. NOT mutated URIs.
#### #URIS
Array of one or more [urijs](http://medialize.github.io/URI.js/) objects that can be used for URI manipulations. If there is no url() in the rule returns false.
For example you can use UrlsHelper.URIS[0].href() to get value for the first url() and UrlsHelper.URIS[0].href('new_uri') to set new URI value. See [full documentation](http://medialize.github.io/URI.js/docs.html).
#### #getModifiedRule
After you finished changing values of the URIS you can get modified rule text with this command.
### new ImportHelper( rule )
Object for manipulating values of @import at-rules.
#### #getOriginalRule
Returns original rule that it was created with.
#### #getOriginalURI
Returns original URI from string. NOT mutated URI.
#### #URI
[urijs](http://medialize.github.io/URI.js/) objects that can be used for URI manipulations. If there is no url() in the rule returns false.
For example you can use ImportHelper.URI.href() to get import value and ImportHelper.URI.href('new_uri') to set new URI value. See [full documentation](http://medialize.github.io/URI.js/docs.html).
#### #getModifiedRule
After you finished changing values of the URI you can get modified rule text with this command.
#### #getOriginalMediaQuery
Returns media query from original string.
#### #setMediaQuery( query )
Replace old media query or creates new one.
#### #getMediaQuery
Returns current media query from string.
### Other
#### #regexp
Collection of some useful RegExps based on CSS specification grammar rules: http://www.w3.org/TR/CSS21/grammar.html
- STRINGS RegExp for css <string> with 'ig' flags.
- URLS RegExp for css <uri> with 'ig' flags.
### Examples
Modify string with multiple url() fragments:
```javascript
var helpers = require( 'postcss-helpers' );
var rule = 'url(logo1.png)', url( 'logo2.png' ), url( "logo3.png");
var helper = helpers.createUrlsHelper( rule );
helper.URIS.forEach( function( uri ) {
uri.suffix( 'jpeg' );
} );
var modifiedRule = helper.getModifiedRule(); // url(logo1.jpeg)', url( 'logo2.jpeg' ), url( "logo3.jpeg")
```
Modify @import value:
```javascript
var helpers = require( 'postcss-helpers' );
var rule = '"src/print.css" print';
var helper = helpers.createImportHelper( rule );
helper.URI.directory( 'dist' );
helper.getMediaQuery(); // print
helper.setMediaQuery( 'screen' );
var modifiedRule = helper.getModifiedRule(); // "dist/print.css" screen
```
Test if string contains url() fragments:
```javascript
var helpers = require( 'postcss-helpers' );
var rule = 'url(logo1.png)', url( 'logo2.png' ), url( "logo3.png");
helpers.regexp.URIS.test( rule ); // true
```
### Known problems
UrlsHelper() and ImportHelper() will not escape quotes in the new URI values so escape them yourself.
### Release History
See [CHANGELOG](/CHANGELOG) for detailed changes.
* 2014-08-080.1.0Initial release.
* 2014-08-110.1.1Make RegExps public. Fixed ?#iefix bug.
* 2014-08-120.2.0Added methods for getting original url() values and for media query manipulations.
+7
View File
@@ -0,0 +1,7 @@
'use strict';
module.exports = {
createUrlsHelper: require( './lib/urls' ),
createImportHelper: require( './lib/import' ),
regexp: require( './lib/regexp' )
};
+120
View File
@@ -0,0 +1,120 @@
'use strict';
// using URLjs because I don't want to think about all this:
// http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding
var regexp = require( './regexp' );
var URI = require( 'urijs' );
var UrlHelper = require( './url' );
/**
* ImportHelper constructor
* @constructor
* @param {String} rule @import value.
*/
var ImportHelper = function ( rule ) {
var exports = {};
if ( ! ( this instanceof ImportHelper ) ) {
return new ImportHelper( rule );
}
this._originalURI = this._extractURI( rule );
if ( !this._originalURI ) { return false; }
this._originalRule = rule;
this._mediaQuery = this.getOriginalMediaQuery();
this.URI = URI( this._originalURI );
exports.URI = this.URI;
exports.getOriginalURI = this.getOriginalURI.bind( this );
exports.getModifiedRule = this.getModifiedRule.bind( this );
exports.getOriginalRule = this.getOriginalRule.bind( this );
exports.setMediaQuery = this.setMediaQuery.bind( this );
exports.getMediaQuery = this.getMediaQuery.bind( this );
exports.getOriginalMediaQuery = this.getOriginalMediaQuery.bind( this );
return exports;
};
ImportHelper.prototype = Object.create( UrlHelper.prototype );
ImportHelper.prototype.constructor = ImportHelper;
/**
* Extracts URI from rule.
* @private
* @param {String} rule String to test.
* @returns {String|undefined} Returns URI value or undefined.
*/
ImportHelper.prototype._extractURI = function( rule ) {
if ( rule.match( regexp.URLS ) ) {
return rule.match( regexp.URLS )[ 0 ]
.replace( /^url\s?\(/, '' )
.replace( /\)$/, '' )
.trim()
.replace( /^("|\')/, '' )
.replace( /("|\')$/, '' );
}
else if ( rule.match( regexp.STRINGS ) ) {
return rule.match( regexp.STRINGS )[ 0 ]
.replace( /^("|\')/, '' )
.replace( /("|\')$/, '' );
}
};
/**
* Returns media query from original string.
* @returns {String|boolean} Media query or false.
*/
ImportHelper.prototype.getOriginalMediaQuery = function() {
var query = this.getOriginalRule();
if ( query.match( regexp.URLS ) ) {
query = query.replace( regexp.URLS, '' ).trim();
}
else {
query = query.replace( regexp.STRINGS, '' ).trim();
}
return query || false;
};
/**
* Returns current media query.
* @returns {String|boolean} Media query or false.
*/
ImportHelper.prototype.getMediaQuery = function() {
return this._mediaQuery;
};
/**
* Sets media query value.
* @param {String} query New media query.
*/
ImportHelper.prototype.setMediaQuery = function( query ) {
this._mediaQuery = query;
};
/**
* Returns modified rule.
* @returns {String} Modified rule.
*/
ImportHelper.prototype.getModifiedRule = function () {
var rule = UrlHelper.prototype.getModifiedRule.apply( this );
if ( this.getMediaQuery() !== this.getOriginalMediaQuery() ) {
if ( this.getOriginalMediaQuery() ) {
rule = rule.replace( this.getOriginalMediaQuery(), this.getMediaQuery() || '' ).trim();
}
else if ( this.getMediaQuery() ) {
rule = rule + ' ' + this.getMediaQuery();
}
}
return rule;
};
module.exports = ImportHelper;
+20
View File
@@ -0,0 +1,20 @@
'use strict';
/** Making url() RegExp according to css tokenization rules:
* http://www.w3.org/TR/CSS21/syndata.html#tokenization
*/
var R_W = '[ \\t\\r\\n\\f]*';
var R_NL = '\\n|\\r\\n|\\r|\\f';
var R_UNICODE = '\\\\[0-9a-f]{1,6}(\\r\\n|[ \\n\\r\\t\\f])?';
var R_NONASCII = '[^\\0-\\237]';
var R_ESCAPE = R_UNICODE + '|\\\\[^\\n\\r\\f0-9a-f]';
var R_STRING_1 = '\\"([^\\n\\r\\f\\\\"]|\\\\' + R_NL + '|' + R_ESCAPE + ')*\\"';
var R_STRING_2 = '\\\'([^\\n\\r\\f\\\\\']|\\\\' + R_NL + '|' + R_ESCAPE + ')*\\\'';
var R_STRING = '(' + R_STRING_1 + '|' + R_STRING_2 + ')';
var R_URI = 'url\\(' + R_W + R_STRING + R_W + '\\)|url\\(' + R_W + '([!#$%&*-\\[\\]-~]|' + R_NONASCII + '|' + R_ESCAPE + ')*' + R_W + '\\)';
module.exports = {
STRINGS: new RegExp( R_STRING, 'ig' ),
URLS: new RegExp( R_URI, 'ig' )
};
+92
View File
@@ -0,0 +1,92 @@
'use strict';
// using URLjs because I don't want to think about all this:
// http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding
var URI = require( 'urijs' );
var regexp = require( './regexp' );
/**
* UrlHelper constructor
* @constructor
* @param {String} rule CSS rule with url().
*/
var UrlHelper = function ( rule ) {
var exports = {};
if ( ! ( this instanceof UrlHelper ) ) {
return new UrlHelper( rule );
}
this._originalURI = this._extractURI( rule );
if ( !this._originalURI && this._originalURI !== '') { return false; }
this._originalRule = rule;
this.URI = URI( this._originalURI );
exports.URI = this.URI;
exports.getOriginalURI = this.getOriginalURI.bind( this );
exports.getModifiedRule = this.getModifiedRule.bind( this );
exports.getOriginalRule = this.getOriginalRule.bind( this );
return exports;
};
/**
* Extracts URI from rule.
* @private
* @param {String} rule String to test.
* @returns {String|undefined} Returns URI value or undefined.
*/
UrlHelper.prototype._extractURI = function( rule ) {
if ( rule.match( regexp.URLS ) ) {
return rule.match( regexp.URLS )[ 0 ]
.replace( /^url\s?\(/, '' )
.replace( /\)$/, '' )
.trim()
.replace( /^("|\')/, '' )
.replace( /("|\')$/, '' );
}
return '';
};
/**
* Returns original URI.
* @returns {String} Original URI.
*/
UrlHelper.prototype.getOriginalURI = function () {
return this._originalURI;
};
/**
* Returns modified rule.
* @returns {String} Modified rule.
*/
UrlHelper.prototype.getModifiedRule = function () {
var modifiedURI = this.URI.toString();
var originalHasIEFix = this._originalURI.match( /\?#iefix/ );
var modifiedShouldHaveIEFix = modifiedURI.match( /[^?]#iefix/ );
// TODO Remove VERY ugly ?#iefix exeption handling, urijs normalizing it and removing "?"
if ( originalHasIEFix && modifiedShouldHaveIEFix ) {
modifiedURI = modifiedURI.replace( '#iefix', '?#iefix' );
}
if (this._originalRule.match(/url\(\s*\)/) && modifiedURI) {
return "url('" + modifiedURI + "')";
}
return this._originalRule.replace( this._originalURI, modifiedURI );
};
/**
* Returns original rule.
* @returns {String} Original rule.
*/
UrlHelper.prototype.getOriginalRule = function () {
return this._originalRule;
};
module.exports = UrlHelper;
+73
View File
@@ -0,0 +1,73 @@
'use strict';
var UrlHelper = require( './url' );
var regexp = require( './regexp' );
/**
* UrlsHelper constructor
* @constructor
* @param {String} rule CSS rule with many url() blocks.
*/
var UrlsHelper = function( rule ) {
var exports = {};
if ( !rule.match( regexp.URLS ) ) {
return false;
}
if ( ! ( this instanceof UrlsHelper ) ) {
return new UrlsHelper( rule );
}
this._originalRule = rule;
this._helpers = [];
this.URIS = [];
rule.match( regexp.URLS ).forEach( function( url ) {
var urlHelper = new UrlHelper( url );
this._helpers.push( urlHelper );
this.URIS.push( urlHelper.URI );
}, this );
exports.URIS = this.URIS;
exports.getOriginalURIS = this.getOriginalURIS.bind( this );
exports.getModifiedRule = this.getModifiedRule.bind( this );
exports.getOriginalRule = this.getOriginalRule.bind( this );
return exports;
};
/**
* Returns modified rule.
* @returns {String} Modified rule.
*/
UrlsHelper.prototype.getModifiedRule = function() {
var rule = this._originalRule;
this._helpers.forEach( function ( uri ) {
rule = rule.replace( uri.getOriginalRule(), uri.getModifiedRule() );
} );
return rule;
};
/**
* Returns original rule.
* @returns {String} Original rule.
*/
UrlsHelper.prototype.getOriginalRule = function() {
return this._originalRule;
};
/**
* Returns array of original URIs.
* @returns {String} Original URIs array.
*/
UrlsHelper.prototype.getOriginalURIS = function () {
return this._helpers.map( function( helper ) {
return helper.getOriginalURI();
} );
};
module.exports = UrlsHelper;
+29
View File
@@ -0,0 +1,29 @@
{
"name": "postcss-helpers",
"description": "Some general purpose helpers for PostCSS, created to make working with url() and @import values more easy.",
"version": "0.3.3",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/iAdramelk/postcss-helpers.git"
},
"authors": [
"Alexey Ivanov <iadramelk@gmail.com>"
],
"license": "MIT",
"engines": {
"node": ">=0.12.9"
},
"scripts": {
"test": "mocha --reporter list"
},
"keywords": [
"postcss"
],
"dependencies": {
"urijs": "^1.18.12"
},
"devDependencies": {
"mocha": "^3.5.0"
}
}
+256
View File
@@ -0,0 +1,256 @@
/*global describe, it */
'use strict';
var assert = require( 'assert' );
var UrlHelper = require( './../lib/url' );
var UrlsHelper = require( './../lib/urls' );
var ImportHelper = require( './../lib/import' );
/**
* UrlHelper fuxtures
*/
var UrlRules = [
{
originalURI: 'http://google.com/logo.png',
originalRule: 'url( \'http://google.com/logo.png\' ) no-repeat top left',
originalSuffix: 'png',
modifiedHref: 'logo.png',
modifiedRule: 'url( \'logo.png\' ) no-repeat top left',
},
{
originalURI: 'http://google.com/logo.png',
originalRule: 'url( "http://google.com/logo.png" ) no-repeat top left',
originalSuffix: 'png',
modifiedHref: 'logo.png',
modifiedRule: 'url( "logo.png" ) no-repeat top left',
},
{
originalURI: 'http://google.com/logo.png',
originalRule: 'url( http://google.com/logo.png ) no-repeat top left',
originalSuffix: 'png',
modifiedHref: 'logo.png',
modifiedRule: 'url( logo.png ) no-repeat top left',
},
// Really UGLY fix for ?#iefix case, urijs normalized it's value
{
originalURI: 'font.eot?#iefix',
originalRule: 'url( font.eot?#iefix )',
originalSuffix: 'eot',
modifiedHref: 'font2.eot#iefix',
modifiedRule: 'url( font2.eot?#iefix )',
},
// Fix for blank url()
{
originalURI: '',
originalRule: 'url()',
originalSuffix: '',
modifiedHref: 'image.png',
modifiedRule: 'url(\'image.png\')',
},
];
/**
* UrlHelper tests
*/
UrlRules.forEach( function( v ) {
describe( 'For UrlHelper("' + v.originalRule + '")', function() {
var h = new UrlHelper( v.originalRule );
describe( '#getOriginalRule()', function() {
it( 'should return "' + v.originalRule, function() {
assert.equal( h.getOriginalRule(), v.originalRule );
});
});
describe( '#URI.suffix()', function() {
it( 'should return "' + v.originalSuffix, function() {
assert.equal( h.URI.suffix(), v.originalSuffix );
});
});
describe( '#URI.href()', function() {
it( 'should return "' + v.modifiedHref + '" after #URI.href(' + v.modifiedHref + ')', function() {
h.URI.href( v.modifiedHref );
assert.equal( h.URI.href(), v.modifiedHref );
});
});
describe( '#getModifiedRule()', function() {
it( 'should return "' + v.modifiedRule + ' after #URI.href(' + v.modifiedHref + ')', function() {
assert.equal( h.getModifiedRule(), v.modifiedRule );
});
});
describe( '#getOriginalURI()', function() {
it( 'should return "' + v.originalURI, function() {
assert.equal( h.getOriginalURI(), v.originalURI );
});
});
} );
} );
/**
* UrlsHelper fuxtures
*/
var UrlsRules = [
{
originalURIS: [ '1.jpg', '2.png' ],
originalRule: 'url( \'1.jpg\' ) no-repeat top left, url( \'2.png\' )',
modifiedHref: '3.svg',
modifiedRule: 'url( \'3.svg\' ) no-repeat top left, url( \'3.svg\' )',
},
{
originalURIS: [ '1.jpg', '2.png' ],
originalRule: 'url( "1.jpg" ) no-repeat top left, url( "2.png" )',
modifiedHref: '3.svg',
modifiedRule: 'url( "3.svg" ) no-repeat top left, url( "3.svg" )',
},
{
originalURIS: [ '1.jpg', '2.png' ],
originalRule: 'url( 1.jpg ) no-repeat top left, url( 2.png )',
modifiedHref: '3.svg',
modifiedRule: 'url( 3.svg ) no-repeat top left, url( 3.svg )',
},
];
/**
* UrlsHelper tests
*/
UrlsRules.forEach( function( v ) {
describe( 'For UrlsHelper("' + v.originalRule + '")', function() {
var h = new UrlsHelper( v.originalRule );
describe( '#URIS array', function() {
it( 'should contain "' + v.originalURIS[0] + '" and "' + v.originalURIS[ 1 ] + '"' , function() {
assert.deepEqual( [ h.URIS[ 0 ].href(), h.URIS[ 1 ].href() ], v.originalURIS );
});
});
describe( '#getOriginalRule()', function() {
it( 'should return "' + v.originalRule, function() {
assert.equal( h.getOriginalRule(), v.originalRule );
});
});
describe( '#getModifiedRule()', function() {
it( 'should return "' + v.modifiedRule + ' after setting #URI.href(' + v.modifiedHref + ') to each object in URIS.', function() {
h.URIS.forEach( function( uri ) { uri.href( v.modifiedHref ); } );
assert.equal( h.getModifiedRule(), v.modifiedRule );
});
});
} );
} );
/**
* ImportHelper fuxtures
*/
var ImportRules = [
{
originalQuery: 'print',
query: false,
originalURI: 'fineprint.css',
originalRule: 'url("fineprint.css") print',
modifiedHref: 'style.css',
modifiedRule: 'url("style.css")'
},
{
originalQuery: 'projection, tv',
query: 'projection, tv',
originalURI: 'bluish.css',
originalRule: 'url( bluish.css ) projection, tv',
modifiedHref: 'style.css',
modifiedRule: 'url( style.css ) projection, tv',
},
{
originalQuery: false,
query: false,
originalURI: 'custom.css',
originalRule: '\'custom.css\'',
modifiedHref: 'style.css',
modifiedRule: '\'style.css\''
},
{
originalQuery: false,
query: 'projection, tv',
originalURI: 'chrome://communicator/skin/',
originalRule: 'url("chrome://communicator/skin/")',
modifiedHref: 'style.css',
modifiedRule: 'url("style.css") projection, tv'
},
{
originalQuery: 'screen, projection',
query: 'screen and (orientation:landscape)',
originalURI: 'common.css',
originalRule: '"common.css" screen, projection',
modifiedHref: 'style.css',
modifiedRule: '"style.css" screen and (orientation:landscape)'
},
{
originalQuery: 'screen and (orientation:landscape)',
query: 'screen, projection',
originalURI: 'landscape.css',
originalRule: 'url(\'landscape.css\') screen and (orientation:landscape)',
modifiedHref: 'style.css',
modifiedRule: 'url(\'style.css\') screen, projection'
}
];
/**
* ImportHelper tests
*/
ImportRules.forEach( function( v ) {
describe( 'For ImportHelper("' + v.originalRule + '")', function() {
var h = new ImportHelper( v.originalRule );
describe( '#getOriginalRule()', function() {
it( 'should return "' + v.originalRule, function() {
assert.equal( h.getOriginalRule(), v.originalRule );
});
});
describe( '#URI.href()', function() {
it( 'should return "' + v.modifiedHref + '" after #URI.href( "' + v.modifiedHref + '" )', function() {
h.URI.href( v.modifiedHref );
assert.equal( h.URI.href(), v.modifiedHref );
});
});
describe( '#getOriginalURI()', function() {
it( 'should return "' + v.originalURI + '"', function() {
assert.equal( h.getOriginalURI(), v.originalURI );
});
});
describe( '#getOriginalMediaQuery()', function() {
it( 'should return "' + v.originalQuery + '"', function() {
assert.equal( h.getOriginalMediaQuery(), v.originalQuery );
});
});
describe( '#getMediaQuery()', function() {
it( 'should return "' + v.query + '" after #setMediaQuery( "' + v.query + '" )', function() {
h.setMediaQuery( v.query );
assert.equal( h.getMediaQuery(), v.query );
});
});
describe( '#getModifiedRule()', function() {
it( 'should return "' + v.modifiedRule + ' after #URI.href(' + v.modifiedHref + ')', function() {
assert.equal( h.getModifiedRule(), v.modifiedRule );
});
});
} );
} );