<div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace">Thank you Hans for your help ;</div><div class="gmail_default" style="font-family:'courier new',monospace">easy enough to write and sounds a smart idea to treat anchor as <span class="" id=":1z6.1" tabindex="-1">ptv</span> <span class="" id=":1z6.2" tabindex="-1">without</span> the need to define a new markup. And at least strongly distinctive. That's in my <span class="" id=":1z6.3" tabindex="-1">config</span> now and soon in doc. </div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">For complete information, can you explain how your code let <span class="" id=":1z6.4" tabindex="-1">ptv</span> visible, as compared to the original code which makes <span class="" id=":1z6.5" tabindex="-1">ptv</span> invisible ? </div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace"><div class="gmail_default">your code :</div><div class="gmail_default">"/(\\[\\[#(\\w[-\\w]*)\\]\\](?: *\n)?)(.*?)(\\[\\[#\\2end\\]\\])/s";<br></div><div>vs original code :<br></div></div><div class="gmail_default" style="font-family:'courier new',monospace"><span style="font-size:13px">'/\\(: *(\\w[-\\w]*) *:(?!\\))\\s?(.*?):\\)/s'));</span><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-18 10:10 GMT+01:00 Hans Bracker <span dir="ltr"><<a href="mailto:design@softflow.co.uk" target="_blank">design@softflow.co.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">PS:<br>
<br>
one could define anchored sections as PTVs.<br>
<br>
Add to config.php:<br>
<br>
# make it possible to treat [[#section]] .... [[#sectionend]] as a PTV of name 'section'<br>
$PageTextVarPatterns['[[#anchor]]'] =<br>
  "/(\\[\\[#(\\w[-\\w]*)\\]\\](?: *\n)?)(.*?)(\\[\\[#\\2end\\]\\])/s";<br>
<br>
<br>
then any section of form<br>
<br>
[[#section]]<br>
your text<br>
goes here..<br>
..<br>
..<br>
....<br>
[[#sectionend]]<br>
<br>
is a PTV with name 'section'. Put in your choosen anchor name instead.<br>
Note  the  syntax  of  the  ending  anchorname:  PTV-name  with  'end'<br>
appended.  Anchor  names  must  start  with  a letter, but can contain<br>
numbers and underscores.<br>
<br>
The  advantage  of  using  anchors as PTVs is that you could reference<br>
those  sections  as PTVs and also as anchor sections, use them in urls<br>
for  instance.  The markers are also invisible.  But they maybe not as<br>
easy to write as what you hope.<br>
<br>
Best,<br>
 Hans<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div><br></div><div>---------------------------------------</div>| A | de la langue française<br>| B | <a href="http://www.languefrancaise.net/" target="_blank">http://www.languefrancaise.net</a><br>| C | <a href="mailto:languefrancaise@gmail.com" target="_blank">languefrancaise@gmail.com</a><br>---------------------------------------<div>       @bobmonamour</div><div>---------------------------------------</div></div>
</div>