mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-25 20:57:38 +00:00 
			
		
		
		
	Make use of type attribute consistent
This commit is contained in:
		| @@ -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 | ||||||
|   | |||||||
| @@ -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); | ||||||
|   | |||||||
							
								
								
									
										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> | ||||||
		Reference in New Issue
	
	Block a user
	 jeremy@jermolene.com
					jeremy@jermolene.com