[pmwiki-users] Nested div markup
Patrick R. Michaud
pmichaud at pobox.com
Thu Feb 15 09:18:55 CST 2007
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.
Currently we have several div markups available:
(:div class='xyz':)...(:div:) basic div
(:div1 class='xyz':)...(:div1:) div that allows nesting
>>xyz<< div with 'xyz' wikistyle applied
The current problem is that there's not a convenient way to
associated wikistyles with nested divs. My original thought
had been to use multiple angle brackets to indicate nesting levels,
so that >>><<< corresponds to a (:div1:), >>>><<<< is a (:div2:), etc.
Thus the markup on the left below would be equivalent to the items
on the right:
>>xyz<< (:div:)%xyz div%
Some text Some text
>>>abc<<< (:div1:)%abc div%
A nested div A nested div
>>><<< (:div1end:)
Back to outer div Back to outer div
>><< (:divend:)
PITS:00887 proposes a somewhat different (and possibly clearer)
markup, by prefacing the >><< with a div number. Thus instead
of >>><<<, >>>><<<<, >>>>><<<<<, we would use 1>><<, 2>><<, 3>><<,
etc. Then the above would be:
>>xyz<<
Some text
1>>abc<<
A nested div
1>><<
Back to outer div
>><<
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.
Another option would be to put div level markers on the inside
of the angle brackets, thus >>1 ...<<, >>2 ...<<, etc. to
correspond to (:div1:), (:div2:), etc.
Comments?
Pm
More information about the pmwiki-users
mailing list