1
0
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:
jeremy@jermolene.com 2022-07-18 19:44:37 +01:00
parent 189fe428b7
commit 30f7b37cba
3 changed files with 44 additions and 4 deletions

View File

@ -231,7 +231,8 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
this.transcludeIndex, this.transcludeIndex,
{ {
parseAsInline: parseAsInline, parseAsInline: parseAsInline,
subTiddler: this.transcludeSubTiddler subTiddler: this.transcludeSubTiddler,
defaultType: this.transcludeType
}); });
} }
// Return the parse tree // Return the parse tree

View File

@ -1029,10 +1029,11 @@ exports.parseTextReference = function(title,field,index,options) {
}; };
exports.getTextReferenceParserInfo = function(title,field,index,options) { exports.getTextReferenceParserInfo = function(title,field,index,options) {
var tiddler, var defaultType = options.defaultType || "text/vnd.tiddlywiki",
tiddler,
parserInfo = { parserInfo = {
sourceText : null, sourceText : null,
parserType : "text/vnd.tiddlywiki" parserType : defaultType
}; };
if(options.subTiddler) { if(options.subTiddler) {
tiddler = this.getSubTiddler(title,options.subTiddler); tiddler = this.getSubTiddler(title,options.subTiddler);

View 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>