Skip to content

Commit

Permalink
Links in testcase output switch to the tab containing that tiddler
Browse files Browse the repository at this point in the history
Thanks to @btheado for the suggestion
  • Loading branch information
Jermolene committed May 7, 2024
1 parent 83ebfc6 commit 648855e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion core/ui/TestCases/DefaultTemplate.tid
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
title: $:/core/ui/testcases/DefaultTemplate

\whitespace trim
\procedure linkcatcherActions()
<%if [<navigateTo>has[title]] %>
<$let
state={{{ [<qualify "$:/state/testcase">] }}}
>
<$qualify title=<<state>> name="qualifiedState">
<$action-setfield $tiddler=<<qualifiedState>> text=<<navigateTo>>/>
</$qualify>
</$let>
<%endif%>
\end

<$let
state={{{ [<qualify "$:/state/testcase">] }}}
>
Expand Down Expand Up @@ -41,7 +53,9 @@ title: $:/core/ui/testcases/DefaultTemplate
<%if [<displayFormat>!match[]else[wikitext]match[plaintext]] %>
<pre><$view tiddler="Output" format="plainwikified" mode="block"/></pre>
<%else%>
<$transclude $tiddler="Output" $mode="block"/>
<$linkcatcher actions=<<linkcatcherActions>>>
<$transclude $tiddler="Output" $mode="block"/>
</$linkcatcher>
<%endif%>
</div>
</div>
Expand Down

0 comments on commit 648855e

Please sign in to comment.