mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-17 03:20:02 +00:00
Ensure tiddler.getFieldStringBlock uses a deterministic ordering
Makes diffs easier to track
This commit is contained in:
parent
58cdbbf865
commit
0513837228
@ -75,16 +75,16 @@ Get all the fields as a name:value block. Options:
|
|||||||
*/
|
*/
|
||||||
exports.getFieldStringBlock = function(options) {
|
exports.getFieldStringBlock = function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var exclude = options.exclude || [];
|
var exclude = options.exclude || [],
|
||||||
var fields = [];
|
fields = Object.keys(this.fields).sort(),
|
||||||
for(var field in this.fields) {
|
result = [];
|
||||||
if($tw.utils.hop(this.fields,field)) {
|
for(var t=0; t<fields.length; t++) {
|
||||||
if(exclude.indexOf(field) === -1) {
|
var field = fields[t];
|
||||||
fields.push(field + ": " + this.getFieldString(field));
|
if(exclude.indexOf(field) === -1) {
|
||||||
}
|
result.push(field + ": " + this.getFieldString(field));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fields.join("\n");
|
return result.join("\n");
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.getFieldDay = function(field) {
|
exports.getFieldDay = function(field) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user