mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-05 21:33:52 +00:00
Text-slicer: Fix title of document tiddler
For compatibility with the previous version, we ensure that the document tiddler ends up with the base tiddler title.
This commit is contained in:
parent
642a6505a1
commit
47d065b239
@ -375,7 +375,8 @@ Slicer.prototype.assignTitlesToChunks = function() {
|
|||||||
// Create a title for each tiddler
|
// Create a title for each tiddler
|
||||||
var titles = {};
|
var titles = {};
|
||||||
this.chunks.forEach(function(chunk) {
|
this.chunks.forEach(function(chunk) {
|
||||||
var title = self.makeUniqueTitle(titles,chunk["toc-type"] + "-" + chunk.title)
|
var base = chunk["toc-type"] === "document" ? "" : chunk["toc-type"] + "-" + chunk.title,
|
||||||
|
title = self.makeUniqueTitle(titles,base);
|
||||||
titles[title] = true;
|
titles[title] = true;
|
||||||
chunk.title = title;
|
chunk.title = title;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user