1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

Import global macros when render title (#8097)

* fix: import lingo macro when render title

* refactor: only import lingo macro for title to save memory

* Revert "refactor: only import lingo macro for title to save memory"

This reverts commit 36bf0848e0.
This commit is contained in:
lin onetwo 2024-06-04 11:13:41 -05:00 committed by GitHub
parent 913d15dc53
commit 4860b14315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,7 +29,11 @@ var THROTTLE_REFRESH_TIMEOUT = 400;
exports.startup = function() {
// Set up the title
$tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE,{document: $tw.fakeDocument, parseAsInline: true});
$tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE, {
document: $tw.fakeDocument,
parseAsInline: true,
importPageMacros: true,
});
$tw.titleContainer = $tw.fakeDocument.createElement("div");
$tw.titleWidgetNode.render($tw.titleContainer,null);
document.title = $tw.titleContainer.textContent;