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 winter

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