[pmwiki] Re: [Pmwiki-users] problems with returns and paragraphs

Bernhard Weichel in pmwiki-users pmwiki-users at b-weichel.2in.de
Sun Jun 29 08:24:50 CDT 2003


Patrick R. Michaud wrote:
> There's a chance.  I started to render paragraphs as <p>text</p>
> instead of using <p /> but ran into a few complications so I went
> with what "worked" 
> to get the 0.5.0 release finished and figured I could revisit it
> later if needed.
> 
> So, I'll have to take a look at it and see what I can do.

Perhaps it makes sense to bring in some sort of context stack.

It could be a class with the methods:

 pushContenxt(<context>, <closecontext>, output)
 popContext
 CheckCarContext(context) checks if it is the current contenxt
 CheckContext(context) checks if it is somewhere in the context
 CloseCarContext          closes the current context
 CloseContext(context)    closes all contexts to the argument
 CloseAllContext          closes all contexts.

A context can have a name, a context which closes it if it is open.

output could be the same as it is now in the FmtVariables ....

e.g.

  pushContext("table", "table", "<table>")
  pushContext("tr")
  pushContext("td")
  pushContext("p")

  ....

  closeContext("table")

This would allow customizers to easy maintain more complex markup.

I wonder what you think...

--Bernhard




More information about the pmwiki-users mailing list