mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
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.
This commit is contained in:
parent
3644462a80
commit
e9a1a53922
@ -294,7 +294,9 @@ $tw.utils.parseFields = function(text,fields) {
|
|||||||
if(p !== -1) {
|
if(p !== -1) {
|
||||||
var field = line.substr(0, p).trim(),
|
var field = line.substr(0, p).trim(),
|
||||||
value = line.substr(p+1).trim();
|
value = line.substr(p+1).trim();
|
||||||
fields[field] = value;
|
if(field) {
|
||||||
|
fields[field] = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user