Index: openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl,v diff -u -r1.9.2.7 -r1.9.2.8 --- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 26 Mar 2003 18:12:41 -0000 1.9.2.7 +++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 27 Mar 2003 12:11:01 -0000 1.9.2.8 @@ -1,4 +1,4 @@ -zad_library { +ad_library { Contains procs used to manipulate chunks of text and html, most notably converting between them. @@ -119,8 +119,6 @@ # Remove whitespace before \n's regsub -all {[ \t]*\n} $text "\n" text - - # Wrap P's around paragraphs set text "

$text

" @@ -130,10 +128,11 @@ # Lars: This must be done after we've made P tags, because otherwise the line # breaks will already have been converted into BR's. - # remove line breaks right before HTML tags that will insert a paragraph break themselves + # remove line breaks right before and after HTML tags that will insert a paragraph break themselves if { $includes_html_p } { foreach tag { ul ol li blockquote p div table tr td th } { regsub -all -nocase "\\n\\s*(<${tag}\\s*\[^>\]*>)" $text {\1} text + regsub -all -nocase "(<${tag}\\s*\[^>\]*>)\\s*\\n" $text {\1} text } }