1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-10 02:38:06 +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