Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed CSS Pipeline failing with Google remote fonts if the file was minified (#1261) #1763

Merged
merged 2 commits into from
Nov 28, 2017

Conversation

mahagr
Copy link
Member

@mahagr mahagr commented Nov 23, 2017

Had to make regex'es ungreedy. I think the same issue is in

CSS_SOURCEMAP_REGEX
CSS_IMPORT_REGEX
HTML_TAG_REGEX (well, this seems to be used with a single <script> or <style> tag, but...

@mahagr
Copy link
Member Author

mahagr commented Nov 23, 2017

@rhukster Review please. :) I'm pretty sure it's all ok, but because of I pulled my hair out with this one, I'd rather to have extra pairs of eyes.

@mahagr
Copy link
Member Author

mahagr commented Nov 23, 2017

I'm thinking if the last case we should revert the ungreedy regex, mostly because of someone may have put unescaped tags into the JS...

@mahagr
Copy link
Member Author

mahagr commented Nov 23, 2017

I meant greedy again, lol.. Well, now it should work in all cases.

@rhukster rhukster merged commit 59dd0d1 into develop Nov 28, 2017
@mahagr mahagr deleted the feature/css_pipe_greedy branch November 28, 2017 11:11
@MattAppleton
Copy link
Contributor

Hello! Since updating to the new 1.6 Grav I have encountered this same problem again...

Previously I have been adding Google fonts to my css like this

@import url('https://fonts.googleapis.com/css?family=EB+Garamond:400,400i,500,500i,600,600i,700,700i,800,800i');

This @import is now omitted from the piplined css since the update.

If I put a direct link into my base.html.twig liek so

<link href="https://fonts.googleapis.com/css?family=EB+Garamond:400,400i" rel="stylesheet">

my fonts reappear...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants