PageTextVariables

Testing the functionality of page text variables, especially leading and trailing spaces, and construction of variable names

Page text variable name with one leading space:
 Insect: Weta
: Bird: Kiwi
(: Tree: Kauri:)

"{$:Insect}"
"{$:Bird}"
"{$:Tree}"
 Insect: Weta
Bird
Kiwi

"Weta" "Kiwi" "Kauri"

works incorrectly
Page text variable name with one trailing space:
Flower : Kowhai
:Fish : Eel
(:River : Waikato:)

"{$:Flower}"
"{$:Fish}"
"{$:River}"

Flower : Kowhai

Fish
Eel

"Kowhai" "Eel" "Waikato"

works incorrectly
Page text variable name with one embedded space:
Flower pot: Ceramic
:Fish part: Fin
(:River run: Long:)

"{$:Flower pot}"
"{$:Fish part}"
"{$:River run}"

Flower pot: Ceramic

Fish part
Fin

(:River run: Long:)

"{$:Flower pot}" "{$:Fish part}" "{$:River run}"

works ok
Numerals in names:
1Way: one way
:2Way: two 
(:3Way: three:)
Way4: four
:Way5: five
(:Way6: six:)

"{$:1Way}"
"{$:2Way}"
"{$:3Way}"
"{$:Way4}"
"{$:Way5}"
"{$:Way6}"

1Way: one way

2Way
two

Way4: four

Way5
five

"one way" "two " "three" "four" "five" "six"

works ok
Non Ascii names:
Schrödinger: Erwin Rudolf Josef Alexander
:Röntgen: Wilhelm Conrad 
(:Dalén: Nils Gustaf:)

"{$:Schrödinger}"
"{$:Röntgen}"
"{$:Dalén}"

Schrödinger: Erwin Rudolf Josef Alexander

Röntgen
Wilhelm Conrad

(:Dalén: Nils Gustaf:)

"{$:Schrödinger}" "{$:Röntgen}" "{$:Dalén}"

works ok
Recursive page text variable:
Dirac:{$:Dirac}
:Fowler:{$:Fowler}
(:Hellman:{$:Hellman}:)
Tip*tree:{$:Shel*don} %red% - don't try this, see [[PITS.00915]]

Sheldon:{$:Tiptree}

"{$:Dirac}"
"{$:Fowler}"
"{$:Hellman}"
"{$:Tiptree}"
"{$:Sheldon}"

Dirac:

Fowler

Tip*tree:{$:Shel*don} - don't try this, see PITS.00915

Sheldon:

"" "" "" "" ""

works ok
Page text variable name with link:
[[{$FullName}|Scientist]]: Rutherford
:[[{$FullName}|Climber]]: Hillary

"{$:Scientist}"
"{$:Climber}"

Scientist: Rutherford

Climber
Hillary

"" ""

works ok
Page text variable in tables or markup:
||Naturalist: ||Charles Darwin ||
||Zoologist: Alfred Russel Wallace ||
"{$:Naturalist}"
"{$:Zoologist}"

[-Botanist:-] Gregor Mendel
"{$:Botanist}"

EvolutionaryBiologist: Stephen Jay Gould
"{$:EvolutionaryBiologist}"

PtvTemplate: PTVWithPageList
"{$:PtvTemplate}"
Naturalist:Charles Darwin
Zoologist: Alfred Russel Wallace

"" ""

Botanist: Gregor Mendel ""

EvolutionaryBiologist?: Stephen Jay Gould "Stephen Jay Gould"

PtvTemplate: PTVWithPageList "PTVWithPageList"

works as expected, markup defeats PTVs, note odd behaviour with Wiki Links
Formatting breaks page text variables
Arthur:C Clarke
-< Isaac: Asimov
-> Robert: Heinlein
* Larry: Niven 
# Poul: Anderson
%red%John: Christopher
:Cordwainer: Smith
''James: Blish
 Hal: Clement


-< {$:Arthur}
-< {$:Isaac}
-< {$:Robert}
-< {$:Larry}
-< {$:Poul}
-< {$:John}
-< {$:Cordwainer}
-< {$:James}
-< {$:Hal}

Arthur:C Clarke

Isaac: Asimov
Robert: Heinlein
  • Larry: Niven
  1. Poul: Anderson

John: Christopher

Cordwainer
Smith

''James: Blish

 Hal: Clement
C Clarke
Smith
Clement
Using character codes
(:source:Test.&#80;&#116;&#118;/:)
"{$:source}"

Attach:{$:source}bushtrack.jpg

"Test.Ptv/"

Attach:Test.Ptv/bushtrack.jpg Δ

why do character entities not work in Attach?
(:thisyear:{(ftime fmt=%Y when=tomorrow)}:)
(:winter:date {$:thisyear}-06-01..{$:thisyear}-11-14:)
(:summer:! {$:winter}:)

* thisyear - {$:thisyear} 
* summer - {$:summer} 
* winter - {$:winter}

(:if {$:summer}:) (:comment this section displays in summer:)
its summer
(:ifend:)
(:if {$:winter}:) (:comment this section displays in winter:)
its winter
(:ifend:)

  • thisyear - 2024
  • summer - ! date 2024-06-01..2024-11-14
  • winter - date 2024-06-01..2024-11-14

its summer

 0: 00.00 00.00 config start
 1: 00.01 00.01 config end
 2: 00.21 00.20 MarkupToHTML begin
 3: 00.21 00.20 MarkupToHTML begin
 4: 00.22 00.21 MarkupToHTML end
 5: 00.22 00.21 MarkupToHTML begin
 6: 00.22 00.21 MarkupToHTML end
 7: 00.22 00.21 MarkupToHTML begin
 8: 00.22 00.21 MarkupToHTML end
 9: 00.22 00.21 MarkupToHTML begin
10: 00.22 00.22 MarkupToHTML end
11: 00.22 00.22 MarkupToHTML begin
12: 00.22 00.22 MarkupToHTML end
13: 00.22 00.22 MarkupToHTML begin
14: 00.23 00.22 MarkupToHTML end
15: 00.23 00.22 MarkupToHTML begin
16: 00.23 00.22 MarkupToHTML end
17: 00.23 00.22 MarkupToHTML begin
18: 00.23 00.23 MarkupToHTML end
19: 00.23 00.23 MarkupToHTML begin
20: 00.24 00.23 MarkupToHTML end
21: 00.24 00.23 MarkupToHTML begin
22: 00.24 00.23 MarkupToHTML end
23: 00.24 00.23 MarkupToHTML begin
24: 00.24 00.24 MarkupToHTML end
25: 00.25 00.24 FPLTemplate: Chain begin
26: 00.25 00.24 FPLTemplate: FPLTemplateLoad
27: 00.25 00.24 FPLTemplate: FPLTemplateDefaults
28: 00.25 00.24 FPLTemplate: FPLTemplatePageList
29: 00.25 00.24 MakePageList pre
30: 00.25 00.24 PageListSources begin
31: 00.25 00.24 PageStore::ls begin wiki.d/{$FullName}
32: 00.26 00.25 PageStore::ls merge wiki.d/{$FullName}
33: 00.26 00.25 PageStore::ls end wiki.d/{$FullName}
34: 00.26 00.25 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
35: 00.26 00.25 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
36: 00.26 00.25 PageStore::ls end $FarmD/wikilib.d/{$FullName}
37: 00.26 00.25 PageListSources end count=34
38: 00.26 00.25 PageListSort pre ret=4 order=name
39: 00.26 00.25 MakePageList items count=34, filters=
40: 00.26 00.25 MakePageList post count=34, readc=0
41: 00.26 00.25 PageListSort begin
42: 00.26 00.25 PageListSort sort
43: 00.26 00.25 PageListSort end
44: 00.26 00.25 MakePageList end
45: 00.26 00.25 FPLTemplate: FPLTemplatePmWikiOrg
46: 00.26 00.25 MarkupToHTML begin
47: 00.26 00.25 MarkupToHTML end
48: 00.26 00.25 FPLTemplate: FPLTemplateSliceList
49: 00.26 00.25 FPLTemplate: FPLTemplateFormat
50: 00.27 00.26 MarkupToHTML begin
51: 00.29 00.28 MarkupToHTML end
52: 00.29 00.28 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
53: 00.29 00.28 FPLTemplate: Chain end
54: 00.30 00.29 MarkupToHTML end
55: 00.30 00.29 MarkupToHTML begin
56: 00.31 00.30 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
57: 00.31 00.30 ReadApprovedUrls SiteAdmin.ApprovedUrls end
58: 00.32 00.31 MarkupToHTML end
59: 00.32 00.31 MarkupToHTML begin
60: 00.32 00.31 MarkupToHTML end
61: 00.32 00.31 now
Peak memory: 4,755,632 bytes