mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 07:32:59 +00:00 
			
		
		
		
	Add filename-uri-decoded support for tiddlywiki.files
This commit is contained in:
		| @@ -1560,6 +1560,9 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) { | |||||||
| 						case "filename": | 						case "filename": | ||||||
| 							value = path.basename(filename); | 							value = path.basename(filename); | ||||||
| 							break; | 							break; | ||||||
|  | 						case "filename-uri-decoded": | ||||||
|  | 							value = decodeURIComponent(path.basename(filename)); | ||||||
|  | 							break; | ||||||
| 						case "basename": | 						case "basename": | ||||||
| 							value = path.basename(filename,path.extname(filename)); | 							value = path.basename(filename,path.extname(filename)); | ||||||
| 							break; | 							break; | ||||||
|   | |||||||
| @@ -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 | * ''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// 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// 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 | ** //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 | ** //extname// the extension of the filename of the file containing the tiddler | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jermolene
					Jermolene