logo       

Re: [pmwiki] Re: problems with returns and paragraphs: msg#00149

web.wiki.pmwiki.user

Subject: Re: [pmwiki] Re: problems with returns and paragraphs

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




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise