kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2009-07-31 05:20 am

[dw-free] Multilevel tags function in core2 inserts many blank lines in page source

[commit: http://hg.dwscoalition.org/dw-free/rev/da86607a4be0]

http://bugs.dwscoalition.org/show_bug.cgi?id=1509

Remove excessive linebreaks in page source for multilevel tag lists.

Patch by [personal profile] kaisa.

Files modified:
  • bin/upgrading/s2layers/core2.s2
--------------------------------------------------------------------------------
diff -r bd3f259831cb -r da86607a4be0 bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2	Thu Jul 30 23:46:56 2009 -0500
+++ b/bin/upgrading/s2layers/core2.s2	Fri Jul 31 00:20:08 2009 -0500
@@ -3080,7 +3080,7 @@ function print_multilevel_tags(TagDetail
 
             # $prev_tags has fewer tiers than current tag.
             if ($prev_tags[$pos] == "") {
-                println """<ul $list_class><li $item_class>$tier_code""";
+                print """\n<ul $list_class><li $item_class>$tier_code""";
                 $closing_html[$pos] = "</li></ul>";
             }
             elseif (($tags[$pos] != $prev_tags[$pos]) or ($show_lower_tiers)) {
@@ -3091,7 +3091,7 @@ function print_multilevel_tags(TagDetail
                     var int i = size $closing_html;
                     foreach var string html ($closing_html) {
                         if ($i > $pos) {
-                            println $closing_html[$i];
+                            print $closing_html[$i];
                             $closing_html[$i] = "";
                         }
                         $i--;
@@ -3104,12 +3104,12 @@ function print_multilevel_tags(TagDetail
 
                 if ($closing_html[$pos] == "") {
                     # This is the first tier at this level, so open list.
-                    println """<ul $list_class><li $item_class>$tier_code""";
+                    print """\n<ul $list_class><li $item_class>$tier_code""";
                     $closing_html[$pos] = "</li></ul>";
                 }
                 else {
                     # There have already been tiers added at this level
-                    println """</li>\n<li $item_class>$tier_code""";
+                    print """</li>\n<li $item_class>$tier_code""";
                 }
             }
             else {
--------------------------------------------------------------------------------