mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 04:40:39 -07:00
fix: post-increment, pre-decrement working on #76
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
const resolve = require('resolve-url')
|
||||
const splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/
|
||||
const urlRe = /^(?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)\S*$/
|
||||
const _ = require('./underscore')
|
||||
|
||||
// https://github.com/jinder/path/blob/master/path.js#L567
|
||||
exports.extname = function (path) {
|
||||
@@ -16,7 +17,7 @@ exports.resolve = function (root, path) {
|
||||
if (Object.prototype.toString.call(root) === '[object Array]') {
|
||||
root = root[0]
|
||||
}
|
||||
if (root && root.charAt(root.length - 1) !== '/') {
|
||||
if (root && _.last(root) !== '/') {
|
||||
root += '/'
|
||||
}
|
||||
return resolve(root, path)
|
||||
|
||||
Reference in New Issue
Block a user