summaryrefslogtreecommitdiff
path: root/t/macro/on_phras.sdf
blob: 071cbf50c3f2b7fa1b8abfd1445d0f216cea6699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This file tests the on macro (phrases)

!on phrase '';; $text =~ s/object/Object/

Some text including a {{MYTYPE:mytype object}} and
another {{B:bold object}}.

# Try conditionally setting an attribute and changing the style
!on phrase 'MY\w*';; $attr{'jump'} = "#$text"; $style = 'U'

Some more text including a {{MYTYPE:mytype object}} and
another {{B:bold object}}.

Yet another {{MY:object}}.

H2[obj="MYTYPE"] A Heading which is a MYTYPE

# Try appending to a phrase
!on phrase '';; $append .= ++$igc_count
Hello {{world}}. I hope you are {{B:really {{U:well}}}} today.