mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-30 17:17:02 +00:00
Introduce "thisTiddler" variable (#7182)
* Initial Commit * Change of mind: Do not blank thisTiddler within macros * Revert previous implementation * Somewhat simpler implementation * Add docs * Add docs version tag
This commit is contained in:
29
editions/test/tiddlers/tests/data/this-tiddler/Simple.tid
Normal file
29
editions/test/tiddlers/tests/data/this-tiddler/Simple.tid
Normal file
@@ -0,0 +1,29 @@
|
||||
title: ThisTiddler/Simple
|
||||
description: Simple usage of thisTiddler variable
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\import Macro
|
||||
\define print-this-tiddler()
|
||||
<$text text=<<thisTiddler>>/>
|
||||
\end
|
||||
|
||||
(<$text text=<<thisTiddler>>/>)
|
||||
|
||||
(<<print-this-tiddler>>)
|
||||
|
||||
(<<imported-print-this-tiddler>>)
|
||||
|
||||
+
|
||||
title: Macro
|
||||
|
||||
\define imported-print-this-tiddler()
|
||||
<$text text=<<thisTiddler>>/>
|
||||
\end
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>(Output)</p><p>(Output)</p><p>(Output)</p>
|
||||
Reference in New Issue
Block a user