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

Can't import indented syntax files #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saschagehlich
Copy link

When compiling a sass file using indented syntax, imported files are not compiled using indented syntax and throw syntax errors. I added a failing test to demonstrate that.

@rodneyrehm
Copy link
Member

There's a long standing issue for the Importer infrastructure to gain the ability to specify the format of the returned content: sass/libsass#1695. That said, in #72 we worked around that problem within sass.js another: sass.node.js. The trick is to write the content to emscripten's file system using Sass.writeFile() and have the Importer Callback return the proper path instead of content. libsass will then use the correct parser (SASS vs SCSS) based on the file's extension.

The lower level "fix" would be to include calling sass2scss() in sass_importer_emscripten(), which would also make it necessary to add a flag (like done) to specify if the imported string should be treated as SASS. However, I'd prefer to wait for libsass to solve this issue properly.

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

Successfully merging this pull request may close these issues.

None yet

2 participants