Added hasTag() method to wiki store

This commit is contained in:
Jeremy Ruston committed 2011-12-08 16:19:19 +00:00
1 parent 6d727437e7
commit e9d3a878c1
1 file changed
+11
+11
View File
@@ -59,6 +59,17 @@ var Tiddler = function(/* tiddler,fields */) {
}
};
Tiddler.prototype.hasTag = function(tag) {
if(this.tags) {
for(var t=0; t<this.tags.length; t++) {
if(this.tags[t] === tag) {
return true;
}
}
}
return false;
};
Tiddler.prototype.parseTiddlerField = function(name,value) {
var type = Tiddler.specialTiddlerFields[name];
if(type) {