mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-07 06:14:44 +00:00
Add error formatting for transclusion recursion errors
This commit is contained in:
parent
143d4c1ae4
commit
61af1f9379
@ -65,7 +65,11 @@ TranscludeWidget.prototype.execute = function() {
|
|||||||
// Check for recursion
|
// Check for recursion
|
||||||
if(parser) {
|
if(parser) {
|
||||||
if(this.parentWidget && this.parentWidget.hasVariable("transclusion",recursionMarker)) {
|
if(this.parentWidget && this.parentWidget.hasVariable("transclusion",recursionMarker)) {
|
||||||
parseTreeNodes = [{type: "text", text: "Recursive transclusion error in transclude widget"}];
|
parseTreeNodes = [{type: "element", tag: "span", attributes: {
|
||||||
|
"class": {type: "string", value: "tc-error"}
|
||||||
|
}, children: [
|
||||||
|
{type: "text", text: "Recursive transclusion error in transclude widget"}
|
||||||
|
]}];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Construct the child widgets
|
// Construct the child widgets
|
||||||
|
@ -1447,3 +1447,12 @@ body.tc-dirty span.tc-dirty-indicator, body.tc-dirty span.tc-dirty-indicator svg
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Errors
|
||||||
|
*/
|
||||||
|
|
||||||
|
.tc-error {
|
||||||
|
background: #f00;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user