[Pmwiki-users] Re: Re: [[include: ... ]] part of a page

Christian Ridderström chr
Tue May 4 08:05:27 CDT 2004


On Mon, 3 May 2004, Patrick R. Michaud wrote:

> On Sat, Apr 17, 2004 at 04:05:54PM +0200, Christian Ridderstr?m wrote:
> > 
> > which we want to give a meaning. Now, I like the notation
> > 
> > 	[[para:PageName#anchor]]
> > 
> > which allows me to include only a single paragraph from a page, and I'd
> > like to assign this to [[include:PageName#anchor]].
> 
> I'm working on an implementation, but the above brings up a question--
> what constitutes a "paragraph" in the above?  Which of the following
> is (or should be) a "paragraph" in Christian's sense of the word...
> 
>   - just the markup line containing the anchor
>   - all lines from the markup line containing the anchor up to the
>     next line containing some other anchor
>   - all lines from the markup line containing the anchor up to the
>     next blank line

In my mind, I've used [[para:...] as including:

 - the line with the anchor and all subsequent lines that start 
   with a [[:alnum:]], e.g. the line may not:
   a) Be an empty line
   b) Start with space (i.e. it's really a preformatted line)
   c) Start with '!', '*', or '#'

The allowed characters is probably more than just [[:alnum:]], i.e. 
they should include: '.', ':' and ';' as well. To be honest, I've never 
really thought about this before.

To make things a bit more complicated, I just realized that [[para:...]] 
probably ignores the stuff *before* the anchor. Because if the page 
'PageName' contains:

	!This is about bla bla

then this markup

	* PageName: [[para:PageName]]

produces something like this:

	* PageName: This is about bla bla

and *not*:

	* PageName: !This is about bla bla

So... maybe [[para:]] should be kept like this, while [[include:]] 
includes stuff verbatim.

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list