[pmwiki-users] Automatically add anchors to heading tags? pmwiki-users Digest, Vol 25, Issue 50
haganfox at users.sourceforge.net
Wed Jul 25 18:47:32 CDT 2007
On 26 Jul 2007 10:34:35 +1200, John Rankin <john.rankin at affinity.co.nz> wrote:
> Turning heading text into an anchor guaranteed to be valid would also need
> a bit of care; eg
> !!!Christian Ridderström
> would need to turn the ö into something else,
Maybe there's some regular-expression magic that can do that.
> I think. [[#h_numbers]]
> would be easier *and* safer.
It might be easier, but it would be next-to-worthless to use for
linking to a document section, except perhaps for a dynamic table of
contents. A link like [[SomePage#h_123]] would stop working when
someone inserts another heading, making it pointless to create such a
Using numbers is fine, but once an anchor exists the number needs to
remain the same when more headings are added to the page.
More information about the pmwiki-users