mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-12 03:38:05 +00:00
Generate new tiddler titles that aren't already subject of a draft
This commit is contained in:
@@ -177,7 +177,7 @@ exports.generateNewTitle = function(baseTitle,options) {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
var c = 0,
|
var c = 0,
|
||||||
title = baseTitle;
|
title = baseTitle;
|
||||||
while(this.tiddlerExists(title) || this.isShadowTiddler(title)) {
|
while(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {
|
||||||
title = baseTitle +
|
title = baseTitle +
|
||||||
(options.prefix || " ") +
|
(options.prefix || " ") +
|
||||||
(++c);
|
(++c);
|
||||||
|
|||||||
Reference in New Issue
Block a user