[pmwiki-users] New markup !!#anchor
Petko Yotov
5ko at 5ko.fr
Tue Dec 30 04:13:59 PST 2025
Heads up: The next PmWiki version should have the following markup
addition:
!!#anchor Heading
This should translate to:
<h2 id="anchor">Heading</h2>
There is no space between the ! and the #, there is a space after the
anchor.
The anchor becomes an identifier for the heading, and can be used in
links to the section like Url#anchor. It is notably used in the core
Tables of content and in AutoTOC, maybe others.
Before or when you upgrade, you should search your existing pages for
the string "!#" (with the quotes) and if you have such headings and the
new format is not appropriate, add a space before the # character.
It should also be possible to include sections from other pages with
this format, as in
(:include Page#anchor#anchorend:)
This should first search for [[#anchor]] in the page, then for !#anchor,
in that order, so if both are present, the old [[#anchor]] format wins.
Same for the optional #anchorend.
This should make it easier for writers to add identifiers and permalinks
to headings, and to include sections from other pages.
It should also be possible to disable the "!!#" section pattern or add
other types of section identifiers in pages that can then be used for
inclusion, for example [[##anchor]] used by some recipes.
You may want to download and test the pre-release from PmWiki:ChangeLog:
https://www.pmwiki.org/wiki/PmWiki/ChangeLog
Let me know if you have any questions or difficulties.
Petko
--
If you upgrade : https://www.pmwiki.org/Upgrades
More information about the pmwiki-users
mailing list