Skip to content

Commit

Permalink
one more update
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed Feb 15, 2021
1 parent 47f37d7 commit b77c78c
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 26 deletions.
17 changes: 11 additions & 6 deletions dist/extended-css.cjs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! extended-css - v1.3.9 - Fri Feb 12 2021
/*! extended-css - v1.3.10 - Mon Feb 15 2021
* https://github.com/AdguardTeam/ExtendedCss
* Copyright (c) 2021 AdGuard. Licensed LGPL-3.0
*/
Expand Down Expand Up @@ -719,11 +719,16 @@ var cssUtils = function () {
*/

var normalize = function normalize(cssText) {
cssText = cssText.replace(reAttrFallback, evaluateMatch);
cssText = cssText.replace(reMatchesCss, addQuotes);
cssText = cssText.replace(reContains, addQuotes);
cssText = cssText.replace(reScope, SCOPE_REPLACER);
return cssText;
// cssText = cssText.replace(reAttrFallback, evaluateMatch);
// cssText = cssText.replace(reMatchesCss, addQuotes);
// cssText = cssText.replace(reContains, addQuotes);
// cssText = cssText.replace(reScope, SCOPE_REPLACER);
// return cssText;
var normalizedCssText = cssText.replace(reAttrFallback, evaluateMatch);
normalizedCssText = normalizedCssText.replace(reMatchesCss, addQuotes);
normalizedCssText = normalizedCssText.replace(reContains, addQuotes);
normalizedCssText = normalizedCssText.replace(reScope, SCOPE_REPLACER);
return normalizedCssText;
};

var isSimpleSelectorValid = function isSimpleSelectorValid(selector) {
Expand Down
17 changes: 11 additions & 6 deletions dist/extended-css.esm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! extended-css - v1.3.9 - Fri Feb 12 2021
/*! extended-css - v1.3.10 - Mon Feb 15 2021
* https://github.com/AdguardTeam/ExtendedCss
* Copyright (c) 2021 AdGuard. Licensed LGPL-3.0
*/
Expand Down Expand Up @@ -717,11 +717,16 @@ var cssUtils = function () {
*/

var normalize = function normalize(cssText) {
cssText = cssText.replace(reAttrFallback, evaluateMatch);
cssText = cssText.replace(reMatchesCss, addQuotes);
cssText = cssText.replace(reContains, addQuotes);
cssText = cssText.replace(reScope, SCOPE_REPLACER);
return cssText;
// cssText = cssText.replace(reAttrFallback, evaluateMatch);
// cssText = cssText.replace(reMatchesCss, addQuotes);
// cssText = cssText.replace(reContains, addQuotes);
// cssText = cssText.replace(reScope, SCOPE_REPLACER);
// return cssText;
var normalizedCssText = cssText.replace(reAttrFallback, evaluateMatch);
normalizedCssText = normalizedCssText.replace(reMatchesCss, addQuotes);
normalizedCssText = normalizedCssText.replace(reContains, addQuotes);
normalizedCssText = normalizedCssText.replace(reScope, SCOPE_REPLACER);
return normalizedCssText;
};

var isSimpleSelectorValid = function isSimpleSelectorValid(selector) {
Expand Down
17 changes: 11 additions & 6 deletions dist/extended-css.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! extended-css - v1.3.9 - Fri Feb 12 2021
/*! extended-css - v1.3.10 - Mon Feb 15 2021
* https://github.com/AdguardTeam/ExtendedCss
* Copyright (c) 2021 AdGuard. Licensed LGPL-3.0
*/
Expand Down Expand Up @@ -720,11 +720,16 @@ var ExtendedCss = (function () {
*/

var normalize = function normalize(cssText) {
cssText = cssText.replace(reAttrFallback, evaluateMatch);
cssText = cssText.replace(reMatchesCss, addQuotes);
cssText = cssText.replace(reContains, addQuotes);
cssText = cssText.replace(reScope, SCOPE_REPLACER);
return cssText;
// cssText = cssText.replace(reAttrFallback, evaluateMatch);
// cssText = cssText.replace(reMatchesCss, addQuotes);
// cssText = cssText.replace(reContains, addQuotes);
// cssText = cssText.replace(reScope, SCOPE_REPLACER);
// return cssText;
var normalizedCssText = cssText.replace(reAttrFallback, evaluateMatch);
normalizedCssText = normalizedCssText.replace(reMatchesCss, addQuotes);
normalizedCssText = normalizedCssText.replace(reContains, addQuotes);
normalizedCssText = normalizedCssText.replace(reScope, SCOPE_REPLACER);
return normalizedCssText;
};

var isSimpleSelectorValid = function isSimpleSelectorValid(selector) {
Expand Down
4 changes: 2 additions & 2 deletions dist/extended-css.min.js

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions lib/css-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,18 @@ const cssUtils = (() => {
* @return {string}
*/
const normalize = function (cssText) {
cssText = cssText.replace(reAttrFallback, evaluateMatch);
cssText = cssText.replace(reMatchesCss, addQuotes);
cssText = cssText.replace(reContains, addQuotes);
cssText = cssText.replace(reScope, SCOPE_REPLACER);
return cssText;

// cssText = cssText.replace(reAttrFallback, evaluateMatch);
// cssText = cssText.replace(reMatchesCss, addQuotes);
// cssText = cssText.replace(reContains, addQuotes);
// cssText = cssText.replace(reScope, SCOPE_REPLACER);
// return cssText;

let normalizedCssText = cssText.replace(reAttrFallback, evaluateMatch);
normalizedCssText = normalizedCssText.replace(reMatchesCss, addQuotes);
normalizedCssText = normalizedCssText.replace(reContains, addQuotes);
normalizedCssText = normalizedCssText.replace(reScope, SCOPE_REPLACER);
return normalizedCssText;
};

const isSimpleSelectorValid = function (selector) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "extended-css",
"version": "1.3.9",
"version": "1.3.10",
"description": "Module for applying CSS styles with extended selection properties.",
"main": "dist/extended-css.cjs.js",
"module": "dist/extended-css.esm.js",
Expand Down

0 comments on commit b77c78c

Please sign in to comment.