-
Notifications
You must be signed in to change notification settings - Fork 33
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
Escaping correctly carriage returns #41
Comments
The less lib was just updated recently, maybe that's causing problems? |
I'm not sure, what version should I try then? |
I think we should stick with the latest, I'm just saying that maybe something changed in that lib that is causing the problem... so maybe that's a place to start investigating. This \n issue is tricky, I remember struggling with it before eventually adding this hack to the code. |
Ok so in this case maybe the replacement for "\n" that you added in your code could be replaced by a configurable key instead of "\n", so that people that have the same problem as I do could correct it by just replacing "\n" by nothing, don't you think? |
I'm not sure if I understand the problem you're having. Are you saying that in the resulting less code you see a backslash character and an n character, or are you saying you see newlines? |
Yes, in the compress files we see the backslash character as it is, they do not appear as new lines, so for exemple I have The thing is that we are using another modified version of the PlayLessEngine somewhere else because we need to be able to access the protected function |
Ahhh, ok yeah I think that's most likely your problem. One of the libs included by play-less is probably overwriting the one included by play-press. Try removing the dependency on play-less and also remove play-less from the modules directory in your play installation. |
Thanks for the replies. Unfortunately after removing the the other module that was using also the play-less plugin, I just had the error again (which I did not have for some time but appeared again). Here's what the bootstrap.less file looks like :
and my dependency file looking like |
hmmm.. |
Yes i removed it, nowhere to be found, and it is still happening... so now when it happens I just modified one line in LessCompiler.java and iI reload and it works, but not very good for production environnement! |
You said "when it happens". Does it not happen every time? |
No it does not happen all the time, and I couldn't find a way to reproduce it, it just does sometimes, and then either I restart my play server or I change the the file that makes it buggy. Other than that, I'm using this version of the PlayLessEngine to access the
|
I'm using a modified version of PlayLessPlugin for my needs on a project that is also using Press. Since I needed to be able to get the compiled output of a file as a String, I create a method in PlayLessEngine to do it, and name my class MyPlayLessEngine.
The problem that I'm having now is that after using MyPlayLessEngine on an HTML page, and going on a different Html page that is using the press plugin, then '\n' are inserted inside the pressed Less files, therefore causing the css output to be wrong and not taken into my page.
So I added a package named press in my code, with a PlayLessEngine within to override the default one, and instead of doing
return css.replace("\\n", "\n");
on line 129 I doreturn css.replace("\\n", "").replace("\n", "");
and then I don't have the problem anymore. Has it been happening to anyone? would there be another way to correct this? thanksThe text was updated successfully, but these errors were encountered: