Merge pull request #1392 from tobibeer/1387-fix-tiddlyspot-backup-url

Add resolvepath macro
This commit is contained in:
Jeremy Ruston
2015-02-03 14:22:48 +00:00
4 changed files with 60 additions and 4 deletions
+29
View File
@@ -0,0 +1,29 @@
/*\
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);
};
})();