[SCM] live-manual branch, debian, updated. debian/2.0.0-1-18-g5b4dfbd

Ben Armstrong synrg at debian.org
Thu Dec 16 21:39:10 UTC 2010


The following commit has been merged in the debian branch:
commit 5b4dfbda8fad7858feb38778c5e4287a7d6c29e1
Author: Ben Armstrong <synrg at debian.org>
Date:   Thu Dec 16 17:39:01 2010 -0400

    More html content fixes: removal of remaining tables, unwanted toc entries.

diff --git a/manual/bin/fix-sisu-html.rb b/manual/bin/fix-sisu-html.rb
index a5b4a9b..6d74b40 100755
--- a/manual/bin/fix-sisu-html.rb
+++ b/manual/bin/fix-sisu-html.rb
@@ -8,8 +8,12 @@ input_file=output_file+"~"
 File.rename(output_file,input_file)
 File.open(output_file,"w") do |o|
     doc=Nokogiri::HTML(open input_file)
-    # CSS3 selectors don't support regexes, so this is a bit simplistic.
-    # Change to use a custom pseudo class if anything more complex is needed.
-    doc.css(%[table[summary~="segment"]]).remove
+    # CSS3 selectors don't support regexes, so we take a shotgun approach,
+    # removing all tables with summaries (OK for current sisu output).
+    # Change to use a custom pseudo class if anything more refined is needed.
+    doc.css(%[table[summary]]).remove
+    toc=doc.css(%[h2,h4[class="toc"]]).each do |node|
+	node.remove if node.inner_text.match(/Metadata|Manifest|SiSU/)
+    end
     o.puts doc.to_html
 end

-- 
live-manual



More information about the debian-live-changes mailing list