1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-28 02:50:27 +00:00

Added hasTag() method to wiki store

This commit is contained in:
Jeremy Ruston 2011-12-08 16:19:19 +00:00
parent 6d727437e7
commit e9d3a878c1

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) {