Re: #927 [Csd->Opn]: two bugs with paragraphs

From: Date: Wed, 03 Mar 2004 16:20:24 +0000
Subject: Re: #927 [Csd->Opn]: two bugs with paragraphs
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26062@lists.php.net to get a copy of this message
Hi,
Thanks for your quick reply and fix :) Although I said it were two bugs in the Subject, it were three that i posted. You forgot this one (a workaround is two add two newlines between the paragraph and the list, but it works this way for tables, etc.): Code: ----- Text Text Text * list * list ----- Result: ----- Text Text Text <ul> <li>list</li> <li>list</li> </ul> ----- Expected Result: ----- <p>Text Text Text</p> <ul> <li>list</li> <li>list</li> </ul> -----
This is what I get for reading bug reports while drinking. ;-) Yes, you're right, it is a separate bug and not related to the text-at-beginning-or-end problem I described earlier. I think it's related to some of the block-type rules capturing and replacing the newline before the block (whether list, table, or whatever). Will take a look and patch the patched patch when I fix it. ;-) It might be part of 0.9, now that I think about it; I'm working on two or three new rules that will allow better image control, as well as embedding of URL GET calls.)
I see that the <br/> thing is not a bug, but do you have any idea how to implement it, it is very important for me.
Well, you have one option right now: turn off the 'paragraph' rule and turn on the 'newline' rule in its place. I keep the 'newline' rule in the package for historical purposes only, and cannot vouch for its proper operation or pleasant aesthetics. It is certain to change the spacing of your rendered document, as every \n in the source text will become a <br /> tag. Please think carefully about why you need the <br /> tag; if it is for display purposes only, you might be better off not using it at all. The reason I say this is because when Text_Wiki starts rendering in non-XHTML formats (e.g., RTF, PDF, LaTeX, DocBook, etc) the display-based line-breaks are going to mean different things to different formats, whereas a semantic paragraph will always be a paragraph, regardless of format. -- Paul M. Jones Savant: the simple alternative to Smarty. http://phpsavant.com/

« previous php.pear.dev (#26062) next »