mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 21:39:57 +00:00
Make use of type attribute consistent
This commit is contained in:
parent
189fe428b7
commit
30f7b37cba
@ -65,7 +65,7 @@ TranscludeWidget.prototype.execute = function() {
|
||||
// Set the legacy transclusion context variables only if we're not transcluding a variable
|
||||
if(!this.transcludeVariable) {
|
||||
var recursionMarker = this.makeRecursionMarker();
|
||||
this.setVariable("transclusion",recursionMarker);
|
||||
this.setVariable("transclusion",recursionMarker);
|
||||
}
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets(parseTreeNodes);
|
||||
@ -231,7 +231,8 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
||||
this.transcludeIndex,
|
||||
{
|
||||
parseAsInline: parseAsInline,
|
||||
subTiddler: this.transcludeSubTiddler
|
||||
subTiddler: this.transcludeSubTiddler,
|
||||
defaultType: this.transcludeType
|
||||
});
|
||||
}
|
||||
// Return the parse tree
|
||||
|
@ -1029,10 +1029,11 @@ exports.parseTextReference = function(title,field,index,options) {
|
||||
};
|
||||
|
||||
exports.getTextReferenceParserInfo = function(title,field,index,options) {
|
||||
var tiddler,
|
||||
var defaultType = options.defaultType || "text/vnd.tiddlywiki",
|
||||
tiddler,
|
||||
parserInfo = {
|
||||
sourceText : null,
|
||||
parserType : "text/vnd.tiddlywiki"
|
||||
parserType : defaultType
|
||||
};
|
||||
if(options.subTiddler) {
|
||||
tiddler = this.getSubTiddler(title,options.subTiddler);
|
||||
|
38
editions/test/tiddlers/tests/data/transclude/Typed.tid
Normal file
38
editions/test/tiddlers/tests/data/transclude/Typed.tid
Normal file
@ -0,0 +1,38 @@
|
||||
title: Transclude/Typed
|
||||
description: Typed transclusion
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\procedure testproc()
|
||||
This is ''wikitext''
|
||||
\end
|
||||
|
||||
<$transclude $variable="testproc"/>
|
||||
-
|
||||
<$transclude $variable="testproc" $type="text/plain"/>
|
||||
|
||||
<$transclude $tiddler="Data" $index="testindex"/>
|
||||
-
|
||||
<$transclude $tiddler="Data" $index="testindex" $type="text/plain"/>
|
||||
|
||||
<$transclude $tiddler="Data" $field="custom"/>
|
||||
-
|
||||
<$transclude $tiddler="Data" $field="custom" $type="text/plain"/>
|
||||
+
|
||||
title: Data
|
||||
type: application/x-tiddler-dictionary
|
||||
custom: This is ''wikitext''
|
||||
|
||||
testindex: This is ''wikitext''
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>This is <strong>wikitext</strong>
|
||||
-
|
||||
<pre><code>This is ''wikitext''</code></pre></p><p>This is <strong>wikitext</strong>
|
||||
-
|
||||
<pre><code>This is ''wikitext''</code></pre></p><p>This is <strong>wikitext</strong>
|
||||
-
|
||||
<pre><code>This is ''wikitext''</code></pre></p>
|
Loading…
Reference in New Issue
Block a user