Make the ID node capable of handling paths
TODO: handle invalid paths in the tokenizer or parser
TODO: invalidate "{{ foo/ bar }}"
This commit is contained in:
@@ -79,7 +79,12 @@ Handlebars.PrintVisitor.prototype.STRING = function(string) {
|
||||
};
|
||||
|
||||
Handlebars.PrintVisitor.prototype.ID = function(id) {
|
||||
return "ID:" + id.id;
|
||||
var path = id.id.join("/");
|
||||
if(id.id.length > 1) {
|
||||
return "PATH:" + path;
|
||||
} else {
|
||||
return "ID:" + path;
|
||||
}
|
||||
};
|
||||
|
||||
Handlebars.PrintVisitor.prototype.content = function(content) {
|
||||
|
||||
Reference in New Issue
Block a user