Have you considered Textile to do that for you and then modify its
output for additional adjustments?

On 10/2/06, Patrick Crowley <[EMAIL PROTECTED]> wrote:
Need to convert line breaks into their XHTML equivalents...

- This is comment text
- HTML markup is limited to hyperlinks with rel="nofollow"
- I'm dumping each comment into a .comment div

Is the code below sufficient? Or do you know guys know of a better
method?

comment.gsub("\n", '<br/>')

Best,
Patrick
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to