Skip to content

Path resolution fails if template name starts with "/" #10

@FinalGuy

Description

@FinalGuy

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions