mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 07:32:59 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			447 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			447 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /*\
 | |
| title: $:/core/modules/macros/resolvepath.js
 | |
| type: application/javascript
 | |
| module-type: macro
 | |
| 
 | |
| Resolves a relative path for an absolute rootpath.
 | |
| 
 | |
| \*/
 | |
| (function(){
 | |
| 
 | |
| /*jslint node: true, browser: true */
 | |
| /*global $tw: false */
 | |
| "use strict";
 | |
| 
 | |
| exports.name = "resolvepath";
 | |
| 
 | |
| exports.params = [
 | |
| 	{name: "source"},
 | |
| 	{name: "root"}
 | |
| ];
 | |
| 
 | |
| /*
 | |
| Run the macro
 | |
| */
 | |
| exports.run = function(source, root) {
 | |
| 	return $tw.utils.resolvePath(source, root);
 | |
| };
 | |
| 
 | |
| })();
 | 
