Better error checking for reading field lists

This change ensures that lines starting with a colon are ignored,
allowing them to be used as comments.
print-window-tiddler
Jermolene 2015-05-07 19:24:58 +01:00
rodzic 3644462a80
commit e9a1a53922
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -294,7 +294,9 @@ $tw.utils.parseFields = function(text,fields) {
if(p !== -1) {
var field = line.substr(0, p).trim(),
value = line.substr(p+1).trim();
fields[field] = value;
if(field) {
fields[field] = value;
}
}
}
});