[pmwiki-users] Nested Blocks (tables, divs, etc)

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 24 21:56:54 CST 2009

On Wed, Feb 25, 2009 at 02:16:41AM +0000, Ed W wrote:
> > Way not just make it configurable? In my case  for example it's far more
> > hassle to keep control over the numbering cause I work a lot with
> > includes and sections.
> Sure, it's configurable -- just write a recipe that replaces
> the existing markups with the version(s) you want.  :-)
> I appreciate that you are being flippant, but your suggestion requires
> "forking" a fairly major piece of core code which will obviously 
> now have to be maintained from version to version and also it breaks 
> any further recipes trying to do the same thing

I think I'm being less flippant than you think.  To me it's not a 
"fork" -- PmWiki fully recognizes that people may want to customize 
markups, and it's been designed with that in mind.  As far as
maintaining it from version to version -- there just aren't that
many changes that would affect it.

> I hope there might be some happy medium here.  My own opinion is 
> that lack of explicit closing of tags just leads to problems 
> down the road and lots of complexities parsing things.

We have explicit closing tags for those who want to use them.
I just don't think they need to always be required.

> However, perhaps:
>   >>blah<< continues a div and
>   >>!blah<< closes the outermost level and creates a new block at that level?

We have this already:

    >>blah<<  starts a div and
    >><<      closes it.

> Nested markup would be extremely helpful - it seems like every even 
> simple page I write has to jump through hoops just to live without 
> any sort of nesting...

We have nested markup -- just add some digits to the end of
(:div:), (:table:), or whatever you're using.  And although PmWiki
currently uses digits, there's no significance to them.  In other
words, it would be possible to slightly modify the markup to use 
any alphanumeric sequence:


...with the advantage that some of the "end" tags actually end up being


This also means we don't ever have to worry about end tags
being mismatched with their appropriate open tags -- in this
system it's always explicit.

In the final analysis, people often claim that it's "difficult
to do nesting", but I haven't seen any examples of an actual
difficulty in practice.  Usually it comes down to someone simply
not wanting to type a few extra characters or digits (which is
actually a false tradeoff as I demonstrate above).


More information about the pmwiki-users mailing list