Skip to content

Commit

Permalink
Add filename-uri-decoded support for tiddlywiki.files
Browse files Browse the repository at this point in the history
  • Loading branch information
Jermolene committed Dec 15, 2016
1 parent 74def9e commit ad97694
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boot/boot.js
Expand Up @@ -1560,6 +1560,9 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
case "filename":
value = path.basename(filename);
break;
case "filename-uri-decoded":
value = decodeURIComponent(path.basename(filename));
break;
case "basename":
value = path.basename(filename,path.extname(filename));
break;
Expand Down
Expand Up @@ -23,6 +23,7 @@ Each field can be specified as either a ''string'' or ''array'' value to be assi

* ''source'' - (optional) a string specifying the source value for the field. If not specified, the existing value is used
** //filename// the filename of the file containing the tiddler
** //filename-uri-decoded// the filename of the file containing the tiddler, with [[URI decoding|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent]] applied
** //basename// the filename of the file containing the tiddler without any extension
** //basename-uri-decoded// the filename of the file containing the tiddler without any extension, with [[URI decoding|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent]] applied
** //extname// the extension of the filename of the file containing the tiddler
Expand Down

0 comments on commit ad97694

Please sign in to comment.