mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-05 17:46:19 +00:00
Refactor missing transclusion target
This commit is contained in:
parent
c4fc3168d1
commit
2c58a0ac71
@ -269,22 +269,12 @@ TranscludeWidget.prototype.getTransclusionTarget = function(parseAsInline) {
|
||||
});
|
||||
}
|
||||
// Return the parse tree
|
||||
if(parser) {
|
||||
return {
|
||||
parseTreeNodes: parser.tree,
|
||||
parseAsInline: parseAsInline,
|
||||
text: parser.source,
|
||||
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
|
||||
};
|
||||
}
|
||||
return {
|
||||
parseTreeNodes: parser ? parser.tree : (this.slotFillParseTrees["ts-missing"] || []),
|
||||
parseAsInline: parseAsInline,
|
||||
text: parser && parser.source,
|
||||
type: parser && parser.type
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user