Index: openacs-4/packages/acs-tcl/tcl/util-diff-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/util-diff-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-tcl/tcl/util-diff-procs.tcl 22 Mar 2008 18:31:32 -0000 1.2 +++ openacs-4/packages/acs-tcl/tcl/util-diff-procs.tcl 31 Oct 2008 08:50:42 -0000 1.3 @@ -126,7 +126,7 @@ set frag {} } if {$pretag ne ""} { - set pretag [string map {\n ""} $pretag] + set pretag [string map {\n " "} $pretag] set pretag2 [list] foreach element [split $pretag " "] { if {[string trim $element] ne ""} { @@ -152,7 +152,7 @@ set frag {} } if {$pretag ne ""} { - set pretag [string map {\n ""} $pretag] + set pretag [string map {\n " "} $pretag] set pretag2 [list] foreach element [split $pretag " "] { if {[string trim $element] ne ""} { @@ -190,8 +190,8 @@ } if { $action eq "changed" } { if {$show_old_p} { - ns_log notice "adding " - lappend output + ns_log notice "adding <@d@>" + lappend output <@d@> foreach item [lrange $old_list $old_index1 $old_index2] { if {![string match "<*>" [string trim $item]]} { ns_log notice "deleting item '${item}'" @@ -202,44 +202,44 @@ } } - ns_log notice "adding " - lappend output + ns_log notice "adding " + lappend output } - ns_log notice "adding " - lappend output + ns_log notice "adding <@a@>" + lappend output <@a@> foreach item [lrange $new_list $new_index1 $new_index2] { if {![string match "<*>" [string trim $item]]} { ns_log notice "adding item '${item}'" lappend output [string trim $item] } else { - lappend output ${item} - ns_log notice "adding${item}" + lappend output ${item}<@a@> + ns_log notice "adding${item}<@a@>" } } - ns_log notice "adding " - lappend output + ns_log notice "adding " + lappend output incr i [expr {$old_index2 - $old_index1 + 1}] } elseif { $action eq "deleted" } { - lappend output + lappend output <@d@> foreach item [lrange $old_list $old_index1 $old_index2] { lappend output [string trim $item] } - lappend output + lappend output incr i [expr {$old_index2 - $old_index1 + 1}] } elseif { $action eq "added" } { while {$i < $old_index2} { - ns_log notice "unchanged $item" + ns_log notice "unchanged item" lappend output [lindex $old_list $i] incr i } - lappend output + lappend output <@a@> foreach item [lrange $new_list $new_index1 $new_index2] { if {![string match "<*>" [string trim $item]]} { ns_log notice "adding item" lappend output [string trim $item] } } - lappend output + lappend output } } @@ -250,10 +250,10 @@ } set output [join $output " "] - set output [string map {"" {} - "" - "" {} - "" } $output] + set output [string map {"<@d@>" {} + "" + "<@a@>" {} + "" } $output] return "$output" } \ No newline at end of file