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 - 2019
  • summer - ! date 2019-06-01..2019-11-14
  • winter - date 2019-06-01..2019-11-14

its winter

 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.03 00.02 MarkupToHTML begin
 3: 00.03 00.02 MarkupToHTML begin
 4: 00.04 00.03 MarkupToHTML end
 5: 00.04 00.03 MarkupToHTML begin
 6: 00.04 00.03 MarkupToHTML end
 7: 00.04 00.03 MarkupToHTML begin
 8: 00.04 00.04 MarkupToHTML end
 9: 00.04 00.04 MarkupToHTML begin
10: 00.04 00.04 MarkupToHTML end
11: 00.04 00.04 MarkupToHTML begin
12: 00.04 00.04 MarkupToHTML end
13: 00.04 00.04 MarkupToHTML begin
14: 00.05 00.04 MarkupToHTML end
15: 00.05 00.04 MarkupToHTML begin
16: 00.05 00.05 MarkupToHTML end
17: 00.05 00.05 MarkupToHTML begin
18: 00.05 00.05 MarkupToHTML end
19: 00.05 00.05 MarkupToHTML begin
20: 00.06 00.05 MarkupToHTML end
21: 00.06 00.05 MarkupToHTML begin
22: 00.06 00.06 MarkupToHTML end
23: 00.06 00.06 MarkupToHTML begin
24: 00.06 00.06 MarkupToHTML end
25: 00.07 00.06 FPLTemplate: Chain begin
26: 00.07 00.06 FPLTemplate: FPLTemplateLoad
27: 00.07 00.07 FPLTemplate: FPLTemplateDefaults
28: 00.07 00.07 FPLTemplate: FPLTemplatePageList
29: 00.07 00.07 MakePageList pre
30: 00.07 00.07 PageListSources begin
31: 00.07 00.07 PageStore::ls begin wiki.d/{$FullName}
32: 00.08 00.07 PageStore::ls merge wiki.d/{$FullName}
33: 00.08 00.07 PageStore::ls end wiki.d/{$FullName}
34: 00.08 00.07 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
35: 00.08 00.07 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
36: 00.08 00.07 PageStore::ls end $FarmD/wikilib.d/{$FullName}
37: 00.08 00.07 PageListSources end count=34
38: 00.08 00.07 PageListSort pre ret=4 order=name
39: 00.08 00.07 MakePageList items count=34, filters=
40: 00.08 00.07 MakePageList post count=34, readc=0
41: 00.08 00.07 PageListSort begin
42: 00.08 00.07 PageListSort sort
43: 00.08 00.07 PageListSort end
44: 00.08 00.07 MakePageList end
45: 00.08 00.07 FPLTemplate: FPLTemplatePmWikiOrg
46: 00.08 00.07 MarkupToHTML begin
47: 00.08 00.07 MarkupToHTML end
48: 00.08 00.07 FPLTemplate: FPLTemplateSliceList
49: 00.08 00.07 FPLTemplate: FPLTemplateFormat
50: 00.09 00.08 MarkupToHTML begin
51: 00.11 00.11 MarkupToHTML end
52: 00.11 00.11 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
53: 00.11 00.11 FPLTemplate: Chain end
54: 00.12 00.11 MarkupToHTML end
55: 00.12 00.11 MarkupToHTML begin
56: 00.13 00.12 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
57: 00.13 00.12 ReadApprovedUrls SiteAdmin.ApprovedUrls end
58: 00.14 00.13 MarkupToHTML end
59: 00.14 00.13 MarkupToHTML begin
60: 00.14 00.13 MarkupToHTML end
61: 00.15 00.13 now
Peak memory: 4,092,968 bytes