mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
fix: always allow './' and '../' to be relative, even on windows
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ export class Loader {
|
||||
if (options.relativeReference) {
|
||||
const sep = options.fs.sep
|
||||
assert(sep, '`fs.sep` is required for relative reference')
|
||||
const rRelativePath = new RegExp(['.' + sep, '..' + sep].map(prefix => escapeRegex(prefix)).join('|'))
|
||||
const rRelativePath = new RegExp(['.' + sep, '..' + sep, './', '../'].map(prefix => escapeRegex(prefix)).join('|'))
|
||||
this.shouldLoadRelative = (referencedFile: string) => rRelativePath.test(referencedFile)
|
||||
} else {
|
||||
this.shouldLoadRelative = (referencedFile: string) => false
|
||||
|
||||
Reference in New Issue
Block a user