Skip to content

isRelativeToRoot bug in Windows #7

Closed
@evanlask

Description

@evanlask
function isRelativeToRoot(p){
    return p.indexOf(path.normalize(path.sep)) === 0
}

On Windows path.sep = ""
On OSX path.sep = "/"

root will not work on Windows but it will on OSX when including html like shown below.
@@include = /template/nav.html

It may be safe to change that function to get it working on both platforms.

function isRelativeToRoot(p){
    return p.indexOf('/') === 0
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions