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

Problem with windows... directives not found? #30

Closed
jfrux opened this issue Sep 6, 2012 · 8 comments
Closed

Problem with windows... directives not found? #30

jfrux opened this issue Sep 6, 2012 · 8 comments

Comments

@jfrux
Copy link
Contributor

jfrux commented Sep 6, 2012

I have a simple application.css that says

/*
=require ./file
*/

and the server is returning blank when visiting /assets/application.css
but when I go to /assets/file.css it renders properly.

I assume it's a file path issue, any way to turn on logging / debugging of file paths?

@jfrux
Copy link
Contributor Author

jfrux commented Sep 6, 2012

Ya... so... figured out that if I just do

//=require ./file

it works fine but if I do

/*
*=require ./file
*/

it fails... on windows...

Mac OS X parses the directives fine either way...
Wondering if the regex is having trouble interpreting line breaks in on windows?

@ixti
Copy link
Collaborator

ixti commented Sep 6, 2012

Hmm. it's looks like so

@ixti
Copy link
Collaborator

ixti commented Sep 6, 2012

I don't have Windows to test. But I'm pretty sure it's related to the line breaks.

@ixti
Copy link
Collaborator

ixti commented Sep 6, 2012

Please close an issue if your problem is solved.

@jfrux
Copy link
Contributor Author

jfrux commented Sep 6, 2012

Technically the problem isn't solved... :-
/*
*=require ./file
*/

should work according to your documentation.

@jfrux
Copy link
Contributor Author

jfrux commented Sep 6, 2012

I'd say, if anything, this would be a bug.

@jfrux jfrux closed this as completed Sep 6, 2012
@ixti
Copy link
Collaborator

ixti commented Sep 6, 2012

I got your point, but to be honest I don't have time (and even a machine) to work on Windows compatibility. If you have resources (human/time) I'll be proud to provide any help you'll need to understand where to fix what. Basically you'll need to "play" with one file only (directive processor).

@jfrux jfrux reopened this Sep 8, 2012
@jfrux
Copy link
Contributor Author

jfrux commented Sep 8, 2012

Okay,
After testing and debugging on windows vs Mac I have concluded that the reason it's not parsing new lines is due to how windows handles line breaks.

The directive processor is seeing \r\n for each line on Windows and \n on Mac.

I'm not sure of the best way to fix it but my n00b mind told me to just do...

this.data = this.data.replace(/\r/g,"");

Somewhere but I'm sure that's probably a bad way to do it?

@ixti ixti closed this as completed in e3e905b Sep 9, 2012
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