[Pmwiki-users] Re: [[include: ... ]] part of a page
Patrick R. Michaud
pmichaud
Tue May 4 07:44:45 CDT 2004
On Tue, May 04, 2004 at 02:47:37PM +1200, John Rankin wrote:
> >On Sat, Apr 17, 2004 at 04:05:54PM +0200, Christian Ridderstr?m wrote:
> >> 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
>
> I think we can discount 2, because that would be
> [[include:Page#from#to]]
> if I interpret Christian's proposal correctly.
Not exactly, because [[include:SomePage#from#to]] assumes that the author
writing the include already knows what markup follows the #from section
(i.e., the #to). The advantage of 2 is that the author can name a
section [[include:SomePage#from]] without having to know what anchor
follows it, or that it will still do the right thing even if someone
adds additional anchors/sections to SomePage.
> FWIW, in the [[para:Page#anchor]] markup extension,
> the code treats:
> [[#anchor]]
> What should be included:
> as if the author had omitted the return after [[#anchor]]
> ie it returns "What should be included:"
Good suggestion. I've added this interpretation to my implementation.
Pm
More information about the pmwiki-users
mailing list