minify icon indicating copy to clipboard operation
minify copied to clipboard

import URL wrong if quotation marks missing.

Open rbraband opened this issue 5 years ago • 0 comments

Hello and thanks for the great project. I found a problem that if an import URL has no quotation marks the PathConverter adds a local path to it.

Working:

@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700");
@import url("https://fonts.googleapis.com/css?family=PT+Sans:400,700");

NotWorking:

@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700");
@import url(https://fonts.googleapis.com/css?family=PT+Sans:400,700);

As you can see, the quotation marks are missing in the second import!

The expected result is that the import url is written to the beginning of the file.

Working older version

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700);
@import url(https://fonts.googleapis.com/css?family=PT+Sans:400,700);
.emb_bootstrap {
    font-family: sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%
}

Wrong result actual

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700);
@import url(../../../../../../../css/bootform/"https://fonts.googleapis.com/css?family=PT+Sans:400,700);
.emb_bootstrap {
	font-family: sans-serif;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%
}

I fixed that by adding the quotation marks in the source css.

Regards

rbraband avatar Mar 23 '19 08:03 rbraband