Robert Page IV wrote:

Considering I am not parsing HTML, I am actually trying to 'generate' the text formatting
I want in a HTML page, there is no need for a HTMl parser that I see.



There are quite a few modules that do this too, like Markdown, Textism, and some of the wiki-markup tools. I've written a few simple parsers for this too, as blosxom plugins (http://warpedvisions.org/dl/magiclink-final.tar.gz), which do something like what you are looking for.


Generally you can ignore line-terminators from textareas, as far as formatting the text as html. Line terminators in html/xhtml/xml are mostly ignored, except in special blocks (like pre and cdata), and in special cases where it is treated like whitespace (which can sometimes result in odd spacing before/after divs in certain browsers).

Rather than covert carriage returns to breaks (<br />), I'd suggest to use paragraphs (<p>) or other blocks (divs, lists, definition lists, tables, pre, blockquotes, etc.). Breaks don't style well using CSS, and all of the effects you can get with breaks can be controlled more completely with blocks and custom styles.

--
Bruce Alderson <[EMAIL PROTECTED]>


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to