[Pmwiki-users] pmwiki-0.6.17 released, other news

Patrick R. Michaud pmichaud
Tue May 4 15:23:08 CDT 2004


PmWiki version 0.6.17 has just been released -- 0.6.17 adds enhancements
to the [[include:]] syntax that allows parts of other pages to
be included in the current page.  These markup extensions were originally 
suggested by John Rankin and developed further by Christian Ridderstrom 
and others on the pmwiki-users list.  More details on the include
syntax extensions are below. 

Before that, let me note that PmWiki has recently been added as a project
on freshmeat.net (http://freshmeat.net/projects/pmwiki), for those who 
wish to receive updates/announcements through that forum.  (You can also
use freshmeat to provide your opinion/rating for PmWiki! :-)  

The remainder of this announcement provides details on the [[include:]]
syntax extensions.  As always, suggestions and comments are welcome,
and thanks for your continued support for PmWiki!

Pm


== Extensions to [[include:]] syntax ==

The previous form of include continues to work as before -- i.e.,
[[include:PageName]] or [[include:Group.PageName]] includes the entire
text of PageName into the current page.

One extension to the include syntax makes use of any anchors that
may be defined in another page (via the [[#anchor]] syntax).  Thus
the following are defined:

[[include:PageName#soup#nuts]] - include everything from [[#soup]] to [[#nuts]]
[[include:PageName#soup#]]     - lines from [[#soup]] to the end of the page
[[include:PageName##soup]]     - lines before the one containing [[#soup]]
[[include:PageName#soup]]      - just the line containing [[#soup]] 

If a requested anchor doesn't exist, an error message is returned instead
(controlled by the $IncludeBadAnchorFmt string in config.php).

The other extension allows lines to be selected from a page by line
number, thus:

[[include:RecentChanges##10]]  - the first ten lines of RecentChanges
[[include:RecentChanges#5#10]] - lines 5-10 of RecentChanges
[[include:RecentChanges#5#]]   - lines 5 and afterwards of RecentChanges
[[include:RecentChanges#5]]    - the fifth line of RecentChanges

These extensions may be tuned a bit over the next few versions as people
have a chance to experiment with them, so I don't recommending relying
too strongly on this particular implementation just yet.  In particular,
we may wish to change the semantics of [[include:PageName#soup]] a bit,
and there may be some slight changes with respect to how leading/trailing
newlines are preserved in the substituted text.  Still, I think this
implementation is fairly close to its final form and suitable for use
in most situations where it would be needed.




More information about the pmwiki-users mailing list