mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +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
|
||||
if(parser) {
|
||||
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
|
||||
|
@ -1447,3 +1447,12 @@ body.tc-dirty span.tc-dirty-indicator, body.tc-dirty span.tc-dirty-indicator svg
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/*
|
||||
** Errors
|
||||
*/
|
||||
|
||||
.tc-error {
|
||||
background: #f00;
|
||||
color: #fff;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user