1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-04 03:03:18 +00:00

Refactor missing transclusion target

This commit is contained in:
Jeremy Ruston 2023-07-27 18:48:01 +01:00
parent c4fc3168d1
commit 2c58a0ac71

View File

@ -269,22 +269,12 @@ TranscludeWidget.prototype.getTransclusionTarget = function(parseAsInline) {
}); });
} }
// Return the parse tree // Return the parse tree
if(parser) { return {
return { parseTreeNodes: parser ? parser.tree : (this.slotFillParseTrees["ts-missing"] || []),
parseTreeNodes: parser.tree, parseAsInline: parseAsInline,
parseAsInline: parseAsInline, text: parser && parser.source,
text: parser.source, type: parser && parser.type
type: parser.type };
};
} else {
// If there's no parse tree then return the missing slot value
return {
parseTreeNodes: (this.slotFillParseTrees["ts-missing"] || []),
parseAsInline: parseAsInline,
text: null,
type: null
};
}
}; };
/* /*