Skip to content

Commit

Permalink
fix(liferay-theme-task): LPD-3102 Update regex to allow url with mult…
Browse files Browse the repository at this point in the history
…iple semicolons
  • Loading branch information
fortunatomaldonado committed Feb 20, 2024
1 parent f9e7c0c commit edfa89d
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module.exports = function (css, options) {
css.length &&
css.charAt(0) !== '}' &&
(node = atrule() || rule())
) {
) {
rules.push(node);
comments(rules);
}
Expand Down Expand Up @@ -188,7 +188,7 @@ module.exports = function (css, options) {
while (
null !== css.charAt(i) &&
('*' !== css.charAt(i) || '/' !== css.charAt(i + 1))
) {
) {
++i;
}
i += 2;
Expand Down Expand Up @@ -584,7 +584,13 @@ module.exports = function (css, options) {

function _atrule(name) {
var pos = position();
var m = match(new RegExp('^@' + name + ' *([^;\\n]+);'));
var m = match(
new RegExp(
'^@' +
name +
' *(?:url\\(([^)]+)\\)|([^;\\n]*))(?: *([^;\\n]*))?;'
)
);
if (!m) {
return;
}
Expand Down

0 comments on commit edfa89d

Please sign in to comment.