lasso-js / lasso-less

Lasso.js plugin to support compilation of less dependencies
7 stars 10 forks source link

Paths inside comments should be skipped #21

Closed StarpTech closed 7 years ago

StarpTech commented 7 years ago

Code to reproduce

@font-face {
  font-family: 'circle-video';
  src: url('../fonts/circle-video.eot?73698447');
  src: url('../fonts/circle-video.eot?73698447#iefix') format('embedded-opentype'),
       url('../fonts/circle-video.woff2?73698447') format('woff2'),
       url('../fonts/circle-video.woff?73698447') format('woff'),
       url('../fonts/circle-video.ttf?73698447') format('truetype'),
       url('../fonts/circle-video.svg?73698447#circle-video') format('svg');
  font-weight: normal;
  font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
  @font-face {
    font-family: 'circle-video';
    src: url('../font/circle-video.svg?73698447#circle-video') format('svg');
  }
}
*/

The path ('../font/circle-video.svg.. is marked as invalid and an error is thrown.

austinkelleher commented 7 years ago

Thanks for reporting this issue. I have a PR open (https://github.com/lasso-js/lasso-less/pull/22) with a fix. Should be published today.

StarpTech commented 7 years ago

Thanks for fast fix!

austinkelleher commented 7 years ago

Published lasso-less@2.4.4