[ 
https://issues.apache.org/jira/browse/TAP5-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17550202#comment-17550202
 ] 

Ben Weidig commented on TAP5-2616:
----------------------------------

The current implementation of CSSURLRewriter is quite simplistic and based on 
regex replacement.
So detecting comments would increase complexity immensely.
Although I think it makes sense not to rewrite CSS in comments.

But a sensible implementation would require two modes, "strict" vs. 
"non-strict", or a switch for "ignore comments".
The current approach would be "non-strict", and the default to be 
backward-compatible.

To detect blocks AND line-comments, the parser would have to go through the CSS 
char-by-char AND line-by-line.

> Let CSSURLRewriter ignore comments
> ----------------------------------
>
>                 Key: TAP5-2616
>                 URL: https://issues.apache.org/jira/browse/TAP5-2616
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.5.0
>            Reporter: Erik Faessler
>            Priority: Minor
>              Labels: CSS, rewrite
>
> This occurred with Tapestry version 5.5.0-beta-3.
> I have the following line in a CSS file of mine:
> {color:#808080}/* background : #ffffff url("../images/loader.gif") no-repeat 
> center; */{color}
> The given path does not exist any more due to moving my assets to the 
> META-INF/assets folder.
> I would always get an error about this path not being found despite the fact 
> that the line was commented out. I think it would be better to ignore 
> comments for URL rewriting.
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to