Syntax Error for `url(//...)` #2238

Closed
donaldpipowitch opened this Issue Oct 21, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@donaldpipowitch

The following code throws an error with 2.0.0-b1:

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 200;
  src: local('Source Sans Pro ExtraLight'), local('SourceSansPro-ExtraLight'), url(//themes.googleusercontent.com/static/fonts/sourcesanspro/v5/toadOcfmlt9b38dHJxOBGLhZfOo4eSOlrve6pGrXHAo.woff) format('woff');
}

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 300;
  src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(//themes.googleusercontent.com/static/fonts/sourcesanspro/v5/toadOcfmlt9b38dHJxOBGIPZSf8Ud0kNoe3bGnF7K24.woff) format('woff');
}
SyntaxError: expected ')' got ''' in .../test.less on line 9, column 16:
8 @font-face {
9   font-family: 'Source Sans Pro';
10   font-style: normal;

Works in older Less versions.

@seven-phases-max

This comment has been minimized.

Show comment
Hide comment
@seven-phases-max

seven-phases-max Oct 21, 2014

Member

Confirmed, the minimal example is:

x {
    y: url(//z);
}

It seems that now it interpreters // there as a comment.
(I guess this is because autoCommentAbsorb no longer has any effect at this point, no idea of how to fix it though).

Member

seven-phases-max commented Oct 21, 2014

Confirmed, the minimal example is:

x {
    y: url(//z);
}

It seems that now it interpreters // there as a comment.
(I guess this is because autoCommentAbsorb no longer has any effect at this point, no idea of how to fix it though).

@seven-phases-max seven-phases-max changed the title from Syntax Error after second @font-face to Syntax Error for `url(//...)` Oct 21, 2014

@lukeapage

This comment has been minimized.

Show comment
Hide comment
@lukeapage

lukeapage Oct 21, 2014

Member

we need to set autoAbsorb comment before calling the regex that will absorb url(
then undo it if it comes back with no match

Member

lukeapage commented Oct 21, 2014

we need to set autoAbsorb comment before calling the regex that will absorb url(
then undo it if it comes back with no match

@lukeapage

This comment has been minimized.

Show comment
Hide comment
@lukeapage

lukeapage Oct 21, 2014

Member

I'll have a go at this now if you aren't doing it...

Member

lukeapage commented Oct 21, 2014

I'll have a go at this now if you aren't doing it...

@seven-phases-max

This comment has been minimized.

Show comment
Hide comment
@seven-phases-max

seven-phases-max Oct 21, 2014

Member

@lukeapage, yes, please :)

Member

seven-phases-max commented Oct 21, 2014

@lukeapage, yes, please :)

@lukeapage lukeapage closed this in ba3d24a Oct 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment