TiddlyWikiClassic
TiddlyWikiClassic copied to clipboard
Transcluded sections do not get refreshed.
I used a <<tiddler "transcluded#Section">> in one of my tiddlers.
When the section, or the "transcluded" tiddler changes, the transcluded section does not get refreshed. (see https://groups.google.com/forum/?fromgroups=#!topic/tiddlywiki/lSbd2_J6JWc for an example)
I'm not sure, but I THINK I fixed it.
I imported the CoreTweaks and changed in the tweak to ticket 1147
This line: if(force != null || changeList == null || changeList.indexOf(title) != -1) {
to this line if(force != null || changeList == null || changeList.indexOf(title.replace(/##.*/,'')) != -1) {
This will remove the "##Section" part from the tiddler name and thus make a transcluded section refresh.
related: https://groups.google.com/d/msg/tiddlywiki/W4_yyzmgeEA/dVmGCBtUCSgJ
to reproduce
[[PartlyTranscluded]]
!Section1
not transcluded
!Section2
transcluded
!End
[[transcluding]]
<<tiddler [[PartlyTranscluded##Section2]]>>
possible solution: https://groups.google.com/forum/?hl=de&fromgroups=#!topic/tiddlywiki/Nm0DhKdVmqQ
Preliminary info: probably can be fixed by changing config.refreshers
.tiddler
: substitute
var title = e.getAttribute("tiddler");
with something like
var title = e.getAttribute("tiddler");
var separatorIndex = title.indexOf(config.textPrimitives.sliceSeparator);
if(separatorIndex == -1)
separatorIndex = title.indexOf(config.textPrimitives.sectionSeparator);
if(separatorIndex != -1)
title = title.substr(0,separatorIndex);
to do:
- test if this fixes the issue
- explore if this is a proper fix or the
tiddler
attribute of thespan
generated bytiddler
macro should have another value (title
instead oftitle##section
) in the first place (unlikely, at least in terms of backward compability
PS for myself: see also TransclusionFixesPlugin, "TransclusionContextFix" part where I hijack config.macros.tiddler.renderText
instead, seems to be a weird approach. Also the fix should cover slider
and tabs
macros.