[pmwiki-users] nesting divs and tables

Patrick R. Michaud pmichaud at pobox.com
Mon Aug 7 12:07:31 CDT 2006

On Mon, Aug 07, 2006 at 01:45:37PM +1200, John Rankin wrote:
> On Monday, 7 August 2006 11:11 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >I'm surprised.  Why would it break PublishPDF?
> There are several places that may break:
> - we call a TbookCells function instead of Cells when processing
>   (:table:) makup, so if Cells changes, we'll need to change
>   TbookCells

Yes, Cells does change somewhat (not drastically), but if you're
completely replacing the Cells function with TbookCells (as it
appears that PublishPDF does), then it just means you retain the old
behavior of non-nesting divs.

> - we also do some things to fix up (:closeall:) -- this needs
>   a bit of background...
>   [...]
>   * so if $MarkupFrame[0]['closeall']['...'] changes,
>     the way we process heading markup also has to change 

Yes, $MarkupFrame[0]['closeall']['...'] changes very slightly.
The only real change is the handling of the (:closeall:) tag;
previously (:closeall:) would output whatever it found in 
$MarkupFrame[0]['closeall'];  it still does that but now it does
it in reverse sequence (to make sure that nested constructs are
properly closed in the correct order), which may resolve the
issues you have with:

>   * if a page containing a heading is followed by an unclosed
>     div or table, we have to prevent this error:
>     <section> ... <div> ... </section></div>
>     caused when (:closeall:) markup is processed
>   * so we add a special markup when we close nested sections
>     and have a markup rule that runs after closeall to
>     reverse the incorrect nesting

At any rate, looking at TBookCells it appears that it should be
pretty straightforward to revise it to the new nesting format.
The changes to support nested divs ended up being fairly minor
once I had them all worked out.

At any rate, I'll make the release here soon, preserving
the old behavior when $Transition['nodivnest'] is set, and
then we can start testing to see what breaks or what needs
to change.


More information about the pmwiki-users mailing list