Commits

Anonymous committed 5f9ba00

Now modifying the first <h1> to contain the ID instead of the <div>

This is so the add-self-link script can operate on h1[id].

  • Participants
  • Parent commits d7a444b

Comments (0)

Files changed (1)

temporary-scripts/render-all-in-one-page.pl

             ;
 
         my $div_tag =
-            qq{<div class="page" id="} . calc_page_id(\@path) .qq{">\n}
+            qq{<div class="page">\n};
             ;
+
+        my $id_attr = qq{ id="} . calc_page_id(\@path) .qq{"};
         
         if ($text !~ s{(<body[^>]*>)}{$1$div_tag}ms)
         {
             $text = $div_tag . $text;
         }
+        
+        $text =~ s{<h1>}{<h1$id_attr>};
 
         print {$all_in_one_out_fh} $text, qq{\n</div>\n};
         close($in);
 print {$all_in_one_out_fh} "\n</body></html>\n";
 close($all_in_one_out_fh);
 
-system("cp", "-a", $all_in_one_dir, "/var/www/html/shlomi/perl/p4n-lecture1-all-in-one");
+# Remming out - was only temporary for testing.
+# system("cp", "-a", $all_in_one_dir, 
+#    "/var/www/html/shlomi/perl/p4n-lecture1-all-in-one"
+# );
+