'Cos it's sometimes really hard to figure out where the <p> tags may
or may not go. JSPWikiMarkupParser.paragraphify() tries real hard,
but it does sometimes get it wrong.
In fact, I would very much like to get rid of <p> tags altogether,
and move to pure <div>s with a paragraph class. You can see that
many blogging software (e.g. blogger) already does this - they put in
two <br/> -tags for paragraph breaks, and put a div around everything
else.
It's really easy to get invalid HTML with plugins. If a plugin
contains a block element (e.g. div or hr) you must close the <p>
before calling a plugin - but there's no way to know. You can't
close paragraphs just randomly...
So you can't rely on the <p> tag being there.
(Yeah, we could pipe everything through jtidy. But that would slow
things down quite a bit.)
/Janne
On 12 Jan 2008, at 23:23, Dirk Frederickx wrote:
Janne,
That's exactly what I'm doing ;-)
Just ran into this strange bug while testing.
Why is jspwiki not --always-- rending text inside html tags.
Eg
<h2>Title</h2> text text text
or
<h2>Title</h2><p> text text text</p>
Any particular reason for this ?
dirk
On Jan 12, 2008 6:43 PM, Janne Jalkanen <[EMAIL PROTECTED]>
wrote:
How about defining it differently on the print stylesheet? We do
have jspwiki_print.css for exactly this purpose.
/Janne
On 12 Jan 2008, at 17:25, Dirk Frederickx wrote:
I was looking into JSPWiki printing issues on FF and IE, running
into
following issue.
( https://issues.apache.org/jira/browse/JSPWIKI-128 )
Here is the html :
{{{
<h2>some header </h2>
First part of the text has no tags around it ...
<div class="commentbox">
Here is a commentbox
</div>
More text is comming here after.
}}}
Here is the css for commentbox
{{{
.commentbox { float : left; }
}}}
This renders perfecty on various browsers: Safari, Opera, Mozilla.
However, Firefox (also Camino) freak out: printing yields an blank
page !
Removing the float style resolves the problem.
Apparently, having float elements subsequent to html #text elements
seems to give problems.
One rough measure is just remove all foats from printed pages.
Any other suggestions ?
dirk