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:
Jeremy Ruston
2023-05-06 11:40:22 +01:00
committed by GitHub
parent b61aef27d7
commit a6ced74a13
5 changed files with 61 additions and 1 deletions

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