Hi Misterel85,
This behaviour is found in TiddlyWiki — a non-linear personal web notebook
/*\
title: $:/core/modules/widgets/transclude.js
type: application/javascript
module-type: widget
Transclude widget \*/
...
var parser = this.wiki.parseTextReference( this.transcludeTitle, this.transcludeField, this.transcludeIndex, { parseAsInline: parseAsInline, subTiddler: this.transcludeSubTiddler })
...
And we can lookup the wiki.parseTextReference method here: TiddlyWiki — a non-linear personal web notebook
and see that it uses the `parseText’ method. This means we actually need to look at the $:/core/modules/parsers/wikiparser/wikiparser.js module, where we find:
/*
Push a text widget onto an array, respecting the configTrimWhiteSpace setting
*/
WikiParser.prototype.pushTextWidget = function(array,text) {
if(this.configTrimWhiteSpace) {
text = $tw.utils.trim(text);
}
if(text) {
array.push({type: "text", text: text});
}
};
Now we are getting somewhere. Searching the system tiddler for configTrimWhiteSpace gives us $:/core/modules/parsers/wikiparser/rules/whitespace.js
Where we see the 2 pragma defined as:
\whitespace trim
\whitespace notrim
AHA!
Now we know that if we put the “pragma” of \whitespace notrim at the very beginning of any Tiddler’s text field, then all parsers in that tiddler will not trim whitespace when parsing text.
Try \whitespace notrim before your other wikitext.
Best,
Joshua Fontany