mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-30 16:00:46 +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
|
// 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
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user