Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transcluded sections do not get refreshed. #123

Open
Skeeve opened this issue Apr 15, 2013 · 3 comments
Open

Transcluded sections do not get refreshed. #123

Skeeve opened this issue Apr 15, 2013 · 3 comments
Labels

Comments

@Skeeve
Copy link

Skeeve commented Apr 15, 2013

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.

@pmario
Copy link
Member

pmario commented May 5, 2013

related: https://groups.google.com/d/msg/tiddlywiki/W4_yyzmgeEA/dVmGCBtUCSgJ

to reproduce

[[PartlyTranscluded]]
!Section1
not transcluded
!Section2
transcluded
!End

[[transcluding]]
<<tiddler [[PartlyTranscluded##Section2]]>>

@pmario
Copy link
Member

pmario commented May 5, 2013

@YakovL
Copy link
Contributor

YakovL commented Sep 12, 2018

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 the span generated by tiddler macro should have another value (title instead of title##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.

@pmario pmario added the issue label Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants