single-file-core 1.5.62 → 1.5.63

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.
@@ -16947,6 +16947,14 @@ async function evalTemplate(template = "", options, content, doc, context = {})
16947
16947
  "tab-id": { getter: () => String(options.tabId) },
16948
16948
  "tab-index": { getter: () => String(options.tabIndex) },
16949
16949
  "url-last-segment": { getter: () => decode(getLastSegment(url, options.filenameReplacementCharacter)) },
16950
+ "url-filename": {
16951
+ getter: () => {
16952
+ const pathname = url.pathname;
16953
+ const segments = pathname.split("/");
16954
+ const lastSegment = segments[segments.length - 1] || segments[segments.length - 2] || "";
16955
+ return decode(lastSegment);
16956
+ }, dontReplaceSlash: dontReplaceSlashIfUndefined
16957
+ },
16950
16958
  "bookmark-pathname": { getter: () => bookmarkFolder, dontReplaceSlash: dontReplaceSlashIfUndefined },
16951
16959
  "bookmark-pathname-flat": { getter: () => bookmarkFolder, dontReplaceSlash: false },
16952
16960
  "profile-name": { getter: () => options.profileName },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.5.62",
3
+ "version": "1.5.63",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",