Created
February 26, 2010 20:21
-
-
Save earl/316112 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/modules/ringo/skin/macros.js b/modules/ringo/skin/macros.js | |
index db2573f..ded6e57 100644 | |
--- a/modules/ringo/skin/macros.js | |
+++ b/modules/ringo/skin/macros.js | |
@@ -1,13 +1,14 @@ | |
include('ringo/markdown'); | |
require('core/string'); | |
+var webappEnv = require('ringo/webapp/env'); | |
exports.href_macro = function(tag) { | |
- var req = require('ringo/webapp/env').getRequest(); | |
+ var req = webappEnv.getRequest(); | |
return req.rootPath + (tag.parameters[0] || ''); | |
}; | |
exports.matchPath_macro = function(tag) { | |
- var req = require('ringo/webapp/env').getRequest(); | |
+ var req = webappEnv.getRequest(); | |
if (req && req.path && | |
req.path.substring(req.rootPath.length).match(tag.parameters[0])) { | |
return tag.parameters[1] || "match"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment