mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Allow comments in tiddler field blocks
Particularly useful for commenting in tiddler dictionaries
This commit is contained in:
parent
705c88d1aa
commit
5c9b0d62c4
12
core/boot.js
12
core/boot.js
@ -198,11 +198,13 @@ $tw.utils.parseStringArray = function(value) {
|
||||
$tw.utils.parseFields = function(text,fields) {
|
||||
fields = fields || {};
|
||||
text.split(/\r?\n/mg).forEach(function(line) {
|
||||
var p = line.indexOf(":");
|
||||
if(p !== -1) {
|
||||
var field = line.substr(0, p).trim(),
|
||||
value = line.substr(p+1).trim();
|
||||
fields[field] = value;
|
||||
if(line.charAt(0) !== "#") {
|
||||
var p = line.indexOf(":");
|
||||
if(p !== -1) {
|
||||
var field = line.substr(0, p).trim(),
|
||||
value = line.substr(p+1).trim();
|
||||
fields[field] = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
return fields;
|
||||
|
Loading…
Reference in New Issue
Block a user