mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-27 14:48:19 +00:00
Neatening up
This commit is contained in:
parent
4a39097fee
commit
81679b8514
@ -56,23 +56,17 @@ TranscludeWidget.prototype.execute = function() {
|
|||||||
case "text/html":
|
case "text/html":
|
||||||
// Return the parse tree nodes of the target
|
// Return the parse tree nodes of the target
|
||||||
target = this.parseTransclusionTarget(parseAsInline);
|
target = this.parseTransclusionTarget(parseAsInline);
|
||||||
this.sourceText = target.text;
|
|
||||||
this.parserType = target.type;
|
|
||||||
this.parseAsInline = target.parseAsInline;
|
this.parseAsInline = target.parseAsInline;
|
||||||
parseTreeNodes = target.parseTreeNodes;
|
parseTreeNodes = target.parseTreeNodes;
|
||||||
break;
|
break;
|
||||||
case "text/raw":
|
case "text/raw":
|
||||||
// Just return the raw text
|
// Just return the raw text
|
||||||
target = this.getTransclusionTarget();
|
target = this.getTransclusionTarget();
|
||||||
this.sourceText = target.text;
|
parseTreeNodes = [{type: "text", text: target.text}];
|
||||||
this.parserType = target.type;
|
|
||||||
parseTreeNodes = [{type: "text", text: this.sourceText}];
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// "text/plain" is the plain text result of wikifying the text
|
// "text/plain" is the plain text result of wikifying the text
|
||||||
target = this.parseTransclusionTarget();
|
target = this.parseTransclusionTarget(parseAsInline);
|
||||||
this.sourceText = target.text;
|
|
||||||
this.parserType = target.type;
|
|
||||||
var widgetNode = this.wiki.makeWidget(target.parser,{
|
var widgetNode = this.wiki.makeWidget(target.parser,{
|
||||||
parentWidget: this,
|
parentWidget: this,
|
||||||
document: $tw.fakeDocument
|
document: $tw.fakeDocument
|
||||||
@ -82,6 +76,8 @@ TranscludeWidget.prototype.execute = function() {
|
|||||||
parseTreeNodes = [{type: "text", text: container.textContent}];
|
parseTreeNodes = [{type: "text", text: container.textContent}];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
this.sourceText = target.text;
|
||||||
|
this.parserType = target.type;
|
||||||
// Set the legacy transclusion context variables only if we're not transcluding a variable
|
// Set the legacy transclusion context variables only if we're not transcluding a variable
|
||||||
if(!this.transcludeVariable) {
|
if(!this.transcludeVariable) {
|
||||||
var recursionMarker = this.makeRecursionMarker();
|
var recursionMarker = this.makeRecursionMarker();
|
||||||
|
Loading…
Reference in New Issue
Block a user