single-file-core 1.5.78 → 1.5.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16951,8 +16951,12 @@ async function evalTemplate(template = "", options, content, doc, context = {})
|
|
|
16951
16951
|
getter: () => {
|
|
16952
16952
|
const pathname = url.pathname;
|
|
16953
16953
|
const segments = pathname.split("/");
|
|
16954
|
-
|
|
16955
|
-
|
|
16954
|
+
if (pathname.endsWith("/")) {
|
|
16955
|
+
return "";
|
|
16956
|
+
} else {
|
|
16957
|
+
const lastSegment = segments[segments.length - 1];
|
|
16958
|
+
return decode(lastSegment);
|
|
16959
|
+
}
|
|
16956
16960
|
}, dontReplaceSlash: dontReplaceSlashIfUndefined
|
|
16957
16961
|
},
|
|
16958
16962
|
"bookmark-pathname": { getter: () => bookmarkFolder, dontReplaceSlash: dontReplaceSlashIfUndefined },
|
|
@@ -17050,7 +17054,7 @@ async function evalTemplate(template = "", options, content, doc, context = {})
|
|
|
17050
17054
|
const utf8Array = base64ToBytes(value);
|
|
17051
17055
|
return new TextDecoder("utf-8").decode(utf8Array);
|
|
17052
17056
|
// eslint-disable-next-line no-unused-vars
|
|
17053
|
-
} catch(error) {
|
|
17057
|
+
} catch (error) {
|
|
17054
17058
|
return value;
|
|
17055
17059
|
}
|
|
17056
17060
|
},
|