Expected Behavior
I try to explain the bug as unit test that will fail:
-
Given following directory structure
images/me.svg
views/my_template.jade
-
Given the template name starts with a leading slash (e.g. "/views/my_template" )
-
Given my template uses some include statement with correct relative path, like
include ../images/me.svg
-
When the template is parsed
-
Then the inclusion is expected to succeed.
Actual Behavior
The pseudo test above fails, because the resource loader tries to find the resource as "views/images/me.svg" instead of "images/me.svg".