1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-04-21 14:21:30 +00:00

Add fillignore attribute to transclude widget to fix visible transclusion (#7451)

* slotignore attribute for transclude widget to fix visible transclusion

Fixes #7449

* Remove unneeded depth attribute

No longer needed

* Replace "slotignore" by "fillignore"
This commit is contained in:
Jeremy Ruston
2023-05-14 21:25:35 +01:00
committed by GitHub
parent d5a7425458
commit 70ee30fdf3
5 changed files with 14 additions and 6 deletions

View File

@@ -48,7 +48,7 @@ SlotWidget.prototype.execute = function() {
var pointer = this.parentWidget,
depth = this.slotDepth;
while(pointer) {
if(pointer instanceof TranscludeWidget) {
if(pointer instanceof TranscludeWidget && pointer.hasVisibleSlots()) {
depth--;
if(depth <= 0) {
break;

View File

@@ -384,6 +384,13 @@ TranscludeWidget.prototype.getTransclusionSlotFill = function(name,defaultParseT
}
};
/*
Return whether this transclusion should be visible to the slot widget
*/
TranscludeWidget.prototype.hasVisibleSlots = function() {
return this.getAttribute("$fillignore","no") === "no";
}
/*
Compose a string comprising the title, field and/or index to identify this transclusion for recursion detection
*/