[pmwiki-users] Nested Blocks (tables, divs, etc)
noskule
noskule at gmx.net
Tue Feb 24 14:27:11 CST 2009
Patrick R. Michaud schrieb:
> On Fri, Feb 20, 2009 at 04:39:50PM +0000, Ed W wrote:
>
>> Hi, I am looking through the code in stdmarkup.php, in particular the
>> Cells function and wondering why we don't offer (automatic) nested
>> tables/divs, etc?
>>
>
> The reason PmWiki works the way it does is that I didn't want
> to require (:...end:) tags on every construct, especially for
> non-nested constructs. For example, if we had automatically nested
> tables/divs, then what is now
>
> (:div:)
> first division
> (:div:)
> second division
> (:div:)
> third division
> (:divend:)
>
> would end up being
>
> (:div:)
> first division
> (:divend:)
> (:div:)
> second division
> (:divend:)
> (:div:)
> third division
> (:divend:)
>
> It gets even worse for things like nested (:if:) constructs
> and the like:
>
> (:if ... :)
> (:if2 ... :)
> (:if2 ... :)
> (:if ... :)
> (:if2 ... :)
> (:ifend:)
>
> becomes
>
> (:if ... :)
> (:if ... :)
> (:ifend:)
> (:if ... :)
> (:ifend:)
> (:ifend:)
> (:if ... :)
> (:if ... :)
> (:ifend:)
> (:ifend:)
>
> Since the non-nested cases are far more common than the nested ones,
> I've optimized the markup for that.
>
>
>> This doesn't seem to change or break anything obvious. We could nest
>> divs before, now we can just do it without having to manually number them.
>>
>
> Changing this in the core would break a _lot_ of stuff, as evidenced
> by the examples above.
>
> Pm
>
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.
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
More information about the pmwiki-users
mailing list