mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-01 15:46:18 +00:00
37 lines
580 B
Plaintext
37 lines
580 B
Plaintext
title: Conditionals/BlockMode
|
|
description: Basic conditional shortcut syntax in block mode
|
|
type: text/vnd.tiddlywiki-multiple
|
|
tags: [[$:/tags/wiki-test-spec]]
|
|
|
|
title: Output
|
|
|
|
\procedure test(animal)
|
|
<%if [<animal>match[Elephant]] %>
|
|
|
|
! It is an elephant
|
|
|
|
<%else%>
|
|
|
|
<%if [<animal>match[Giraffe]] %>
|
|
|
|
! It is a giraffe
|
|
|
|
<%else%>
|
|
|
|
! It is completely unknown
|
|
|
|
<%endif%>
|
|
|
|
<%endif%>
|
|
|
|
\end
|
|
|
|
<<test "Giraffe">>
|
|
|
|
<<test "Elephant">>
|
|
|
|
<<test "Antelope">>
|
|
+
|
|
title: ExpectedResult
|
|
|
|
<h1 class="">It is a giraffe</h1><h1 class="">It is an elephant</h1><h1 class="">It is completely unknown</h1> |