eleventy-plugin-cloudcannon
Advanced tools
Comparing version 1.2.1-0 to 1.2.1-1
{ | ||
"name": "eleventy-plugin-cloudcannon", | ||
"version": "1.2.1-0", | ||
"version": "1.2.1-1", | ||
"description": "Eleventy plugin to create CloudCannon editor details", | ||
@@ -5,0 +5,0 @@ "main": ".eleventy.js", |
@@ -8,2 +8,6 @@ function normalisePath(path) { | ||
function removeLeadingAndTrailingSlashes(path) { | ||
return path.replace(/^\/+|\/+$/g, ''); | ||
} | ||
function stripTopPath(path, topPath) { | ||
@@ -19,3 +23,3 @@ const normalisedTop = normalisePath(topPath); | ||
function getSourcePath(inputPath, source) { | ||
return stripTopPath(normalisePath(inputPath), source).replace(/^\/+/, ''); | ||
return stripTopPath(normalisePath(inputPath), removeLeadingAndTrailingSlashes(source)).replace(/^\/+/, ''); | ||
} | ||
@@ -22,0 +26,0 @@ |
27766
540