Skip to content

Escaping correctly carriage returns #41

@mebibou

Description

@mebibou

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 do return 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? thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions