[pmwiki-users] Nested div markup

Patrick R. Michaud pmichaud at pobox.com
Thu Feb 15 15:21:15 CST 2007


On Fri, Feb 16, 2007 at 07:52:15AM +1100, Kathryn Andersen wrote:
> On Thu, Feb 15, 2007 at 09:18:55AM -0600, Patrick R. Michaud wrote:
> > At http://www.pmwiki.org/wiki/PITS/00887, Feral has
> > proposed a very interesting markup for nested divs that 
> > I'm considering and could use some comments/feedback.
> [snip]
> > I kind of like this -- it eliminates the need to count angle
> > brackets, and makes the relationship between 1>>...<< and
> > (:div1:) more explicit.
> > 
> > On the downside, most other things involving "levels" in PmWiki
> > use repetitions of the same character, as in headings (!!, !!!, !!!!),
> > lists (*, **, ***), etc.  So this might be a little inconsistent.
> 
> I do like the multiple angle brackets for this reason, and because they
> look more tidy.  But once you do get beyond 3 or 4 brackets, it *will*
> become difficult to be counting all the brackets, and prone to error.
> The question is, how deeply are people going to need to nest their divs?
> Me, so far, I haven't done any nesting deeper than two levels, but I
> can't speak for other people.

I'd suspect that, just like lists and headings, three levels 
would be rare and four levels very very rare.  So, we're really
looking at just:

    >>abc<<           >>abc<<           >>abc<<
    >>>def<<<         1>>def<<          >>1 def<<
    >>>>ghi<<<<       2>>ghi<<          >>2 ghi<<

Also note that the digit values aren't significant here --
they just identify the corresponding start and end markers.
Any of the versions below would produce equivalent output to
the above:

    >>>>abc<<<<       2>>abc<<          >>2 abc<<
    >>>def<<<         1>>def<<          >>1 def<<
    >>ghi<<           >>ghi<<           >>ghi<<

So, it's entirely up to an author as to whether more >'s or
larger numbers are represent outer divs or inner divs -- all
that PmWiki considers is the order in which they're
encountered in the markup.

And, of course, all of these forms could be made available via
recipe.  So realy what we have to decide is which form(s), if any,
we might want to adopt into the core.  Personally I'm okay with
any of the three.

Pm



More information about the pmwiki-users mailing list