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

multiline /*@cc_on \n - raises "Unterminated RegExp Literal" #19

Open
zuci42 opened this issue Sep 3, 2011 · 1 comment
Open

multiline /*@cc_on \n - raises "Unterminated RegExp Literal" #19

zuci42 opened this issue Sep 3, 2011 · 1 comment

Comments

@zuci42
Copy link

zuci42 commented Sep 3, 2011

While minimizing some js found an issue:

multilne coniditional comments like

/@cc_on
try { if (!window.XMLHttpRequest) document.body.className += ' ie6';} catch(e) {} @
/

error ActionView::Template::Error (Unterminated RegExp Literal) (javascript.rb:168)
raised after /n char in "/*@cc_on\n"

i see closed issue about cc, but that one covers oneliners only

Regretfully i am still not so tough to fix your code quick.
I preffered to use workaround and convert my cc to oneliners already.

Would be cool if someone could manage with that.

BR, & thank for the gem, greatest one as it requires nothing except ruby. no java & no additional tags to use.

@peppyheppy
Copy link
Contributor

hi @Zuci, I added the oneliner cc support a while ago. As @matthewrudy mentioned there appears to be a bug with this. One thing that seems strange is that modernizr doesn't have any conditional comments.

Would be happy to accept a pull request.

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

No branches or pull requests

2 participants