-
Notifications
You must be signed in to change notification settings - Fork 463
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
C API: Import Handler - Get Path of File Containing @import Statement #2348
Comments
I do see the |
Well, after trying it out, it looks like that I guess I just need to confirm that this is the correct approach:
|
The callee stack and import stack are two seperate things. Please always provide the used libsass version! I've added more API functions in this regard very recently, so I'm not sure you already got that changes! |
I'm working with Libsass 3.5.0 Beta 3. The latest tagged release on GitHub. |
In that case your approach seems to be correct AFAICT! |
So If so, I'd recommend adding a note to the docs and maybe include an example of this process on the import-handler examples page. |
I can't tell you that on top of my head. It may also depend if you are querying it during the import phase or during execution phase. Doc PRs are always welcome! |
Generally speaking |
I'm accessing the info from an I have a file named
It would appear that It's a little strange that |
Although that wouldn't be relevant in cases where |
For globbing please refer to this implementation: |
You don't give enough details for me to understand which |
From the passed import to the custom importer. That reference implementation of globbing is perfect! Perhaps a link to that on the docs page for custom importers would be useful. Besides updating the docs, though, I don't think this is an open issue. |
This page documents the C API for
@import
handlers.I would suggest updating these docs to show how the implementor can retrieve the absolute path of the file containing the
@import
statement that's being handled.I've attempted to get that information the same way I get it in my
@warn
and@debug
function handlers:When this runs, however,
idx
is always zero and thus there is nocallee_entry
to query for its path. I looked through the headers, but didn't see an alternative. What's the correct way to do this? And can we update that documentation page to show it?The text was updated successfully, but these errors were encountered: