1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Add error formatting for transclusion recursion errors

This commit is contained in:
Jermolene 2014-09-24 11:50:38 +02:00
parent 143d4c1ae4
commit 61af1f9379
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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;
}