[Pmwiki-users] Proposed [[#anchor]] enhancement
John Rankin
john.rankin
Sun Sep 7 21:56:19 CDT 2003
I have found it really useful to turn:
[[#anchor Some Text]]
into
< a href='#anchor'>Some Text</a>
via a link pattern. See for example:
http://wiki.lianza.org.nz/index.php/Main/ExtraRules
This required the following line of code:
$LinkPatterns[780]["\\[\\[#([A-Za-z][-.:\\w]*?)\\s+(.+?)\\]\\]"] =
"<a href='#$1'>$2</a>";
In hindsight, #anchor, [[#anchor]] and [[#anchor text]]
should probably all behave like links on the current page,
with some other markup used to designate an anchor
reference, such as [#anchor#].
However, since pmwiki is using [[#anchor]] to denote a
reference, I propose that [[#anchor text]] be added to
make it easier to write an in-page link.
--
John Rankin
More information about the pmwiki-users
mailing list