<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -24,7 +24,7 @@ class RDoc::ClassModule
   def document_self_or_methods
     document_self || method_list.any?{ |m| m.document_self }
   end
-  
+
   def with_documentation?
     document_self_or_methods || classes_and_modules.any?{ |c| c.with_documentation? }
   end
@@ -36,84 +36,84 @@ class RDoc::Generator::SHtml
   include SDoc::GitHub
   include SDoc::Templatable
   include SDoc::Helpers
-  
+
   GENERATOR_DIRS = [File.join('sdoc', 'generator'), File.join('rdoc', 'generator')]
-  
+
   # Used in js to reduce index sizes
   TYPE_CLASS  = 1
   TYPE_METHOD = 2
   TYPE_FILE   = 3
-  
+
   TREE_FILE = File.join 'panel', 'tree.js'
   SEARCH_INDEX_FILE = File.join 'panel', 'search_index.js'
-  
+
   FILE_DIR = 'files'
   CLASS_DIR = 'classes'
-  
+
   RESOURCES_DIR = File.join('resources', '.')
-  
+
   attr_reader :basedir
-  
+
   def self.for(options)
     self.new(options)
   end
-  
+
   def self.template_dir template
-		$LOAD_PATH.map do |path|
-		  GENERATOR_DIRS.map do |dir|
-  			File.join path, dir, 'template', template
-	    end
-		end.flatten.find do |dir|
-			File.directory? dir
-		end
+    $LOAD_PATH.map do |path|
+      GENERATOR_DIRS.map do |dir|
+        File.join path, dir, 'template', template
+      end
+    end.flatten.find do |dir|
+      File.directory? dir
+    end
   end
-  
+
   def initialize(options)
-		@options = options
-		@options.diagram = false
+    @options = options
+    @options.diagram = false
     @github_url_cache = {}
-    
-		template = @options.template || 'direct'
 
-		templ_dir = self.class.template_dir template
+    template = @options.template || 'direct'
 
-		raise RDoc::Error, &quot;could not find template #{template.inspect}&quot; unless
-			templ_dir
-		
-		@template_dir = Pathname.new File.expand_path(templ_dir)
-		@basedir = Pathname.pwd.expand_path
+    templ_dir = self.class.template_dir template
+
+    raise RDoc::Error, &quot;could not find template #{template.inspect}&quot; unless
+    templ_dir
+
+    @template_dir = Pathname.new File.expand_path(templ_dir)
+    @basedir = Pathname.pwd.expand_path
   end
-  
+
   def generate( top_levels )
-		@outputdir = Pathname.new( @options.op_dir ).expand_path( @basedir )
-		@files = top_levels.sort
-		@classes = RDoc::TopLevel.all_classes_and_modules.sort
+    @outputdir = Pathname.new( @options.op_dir ).expand_path( @basedir )
+    @files = top_levels.sort
+    @classes = RDoc::TopLevel.all_classes_and_modules.sort
 
-		# Now actually write the output
+    # Now actually write the output
     copy_resources
     generate_class_tree
     generate_search_index
-		generate_file_files
-		generate_class_files
-		generate_index_file
+    generate_file_files
+    generate_class_files
+    generate_index_file
+  end
+
+  def class_dir
+    CLASS_DIR
+  end
+
+  def file_dir
+    FILE_DIR
   end
-  
-	def class_dir
-		CLASS_DIR
-	end
 
-	def file_dir
-		FILE_DIR
-	end
 
-  
   protected
-	### Output progress information if debugging is enabled
-	def debug_msg( *msg )
-		return unless $DEBUG_RDOC
-		$stderr.puts( *msg )
-	end  
-  
+  ### Output progress information if debugging is enabled
+  def debug_msg( *msg )
+    return unless $DEBUG_RDOC
+    $stderr.puts( *msg )
+  end  
+
   ### Create class tree structure and write it as json
   def generate_class_tree
     debug_msg &quot;Generating class tree&quot;
@@ -124,7 +124,7 @@ class RDoc::Generator::SHtml
       f.write('var tree = '); f.write(tree.to_json)
     end unless $dryrun
   end
-  
+
   ### Recursivly build class tree structure
   def generate_class_tree_level(classes)
     tree = []
@@ -139,22 +139,22 @@ class RDoc::Generator::SHtml
     end
     tree
   end
-  
+
   ### Create search index for all classes, methods and files
   ### Wite it as json
   def generate_search_index
     debug_msg &quot;Generating search index&quot;
-    
+
     index = {
       :searchIndex =&gt; [],
       :longSearchIndex =&gt; [],
       :info =&gt; []
     }
-    
+
     add_class_search_index(index)
     add_method_search_index(index)
     add_file_search_index(index)
-    
+
     debug_msg &quot;  writing search index to %s&quot; % SEARCH_INDEX_FILE
     data = {
       :index =&gt; index
@@ -163,11 +163,11 @@ class RDoc::Generator::SHtml
       f.write('var search_data = '); f.write(data.to_json)
     end unless $dryrun
   end
-  
+
   ### Add files to search +index+ array
   def add_file_search_index(index)
     debug_msg &quot;  generating file search index&quot;
-    
+
     @files.select { |file| 
       file.document_self 
     }.sort.each do |file|
@@ -183,11 +183,11 @@ class RDoc::Generator::SHtml
       ])
     end
   end
-  
+
   ### Add classes to search +index+ array
   def add_class_search_index(index)
     debug_msg &quot;  generating class search index&quot;
-    
+
     @classes.select { |klass| 
       klass.document_self_or_methods
     }.sort.each do |klass|
@@ -204,20 +204,20 @@ class RDoc::Generator::SHtml
       ])
     end
   end
-  
+
   ### Add methods to search +index+ array
   def add_method_search_index(index)
     debug_msg &quot;  generating method search index&quot;
-    
+
     list = @classes.map { |klass| 
       klass.method_list
     }.flatten.sort{ |a, b| a.name == b.name ? a.parent.full_name &lt;=&gt; b.parent.full_name : a.name &lt;=&gt; b.name }.select { |method| 
       method.document_self 
     }
     unless @options.show_all
-        list = list.find_all {|m| m.visibility == :public || m.visibility == :protected || m.force_documentation }
+      list = list.find_all {|m| m.visibility == :public || m.visibility == :protected || m.force_documentation }
     end
-    
+
     list.each do |method|
       index[:searchIndex].push( search_string(method.name) + '()' )
       index[:longSearchIndex].push( search_string(method.parent.full_name) )
@@ -231,37 +231,37 @@ class RDoc::Generator::SHtml
       ])
     end
   end
-  
-	### Generate a documentation file for each class
-	def generate_class_files
-		debug_msg &quot;Generating class documentation in #@outputdir&quot;
+
+  ### Generate a documentation file for each class
+  def generate_class_files
+    debug_msg &quot;Generating class documentation in #@outputdir&quot;
     templatefile = @template_dir + 'class.rhtml'
 
-		@classes.each do |klass|
-			debug_msg &quot;  working on %s (%s)&quot; % [ klass.full_name, klass.path ]
-			outfile     = @outputdir + klass.path
-			rel_prefix  = @outputdir.relative_path_from( outfile.dirname )
-      
-			debug_msg &quot;  rendering #{outfile}&quot;
-			self.render_template( templatefile, binding(), outfile )
-		end
-	end
-
-	### Generate a documentation file for each file
-	def generate_file_files
-		debug_msg &quot;Generating file documentation in #@outputdir&quot;
+    @classes.each do |klass|
+      debug_msg &quot;  working on %s (%s)&quot; % [ klass.full_name, klass.path ]
+      outfile     = @outputdir + klass.path
+      rel_prefix  = @outputdir.relative_path_from( outfile.dirname )
+
+      debug_msg &quot;  rendering #{outfile}&quot;
+      self.render_template( templatefile, binding(), outfile )
+    end
+  end
+
+  ### Generate a documentation file for each file
+  def generate_file_files
+    debug_msg &quot;Generating file documentation in #@outputdir&quot;
     templatefile = @template_dir + 'file.rhtml'
-    
-		@files.each do |file|
-			outfile     = @outputdir + file.path
-			debug_msg &quot;  working on %s (%s)&quot; % [ file.full_name, outfile ]
-			rel_prefix  = @outputdir.relative_path_from( outfile.dirname )
-
-			debug_msg &quot;  rendering #{outfile}&quot;
-			self.render_template( templatefile, binding(), outfile )
-		end
-	end
-	
+
+    @files.each do |file|
+      outfile     = @outputdir + file.path
+      debug_msg &quot;  working on %s (%s)&quot; % [ file.full_name, outfile ]
+      rel_prefix  = @outputdir.relative_path_from( outfile.dirname )
+
+      debug_msg &quot;  rendering #{outfile}&quot;
+      self.render_template( templatefile, binding(), outfile )
+    end
+  end
+
   def index_file
     if @options.main_page &amp;&amp; file = @files.find { |f| f.full_name == @options.main_page }
       file
@@ -270,17 +270,17 @@ class RDoc::Generator::SHtml
     end
   end
 
-	### Create index.html with frameset
-	def generate_index_file
-		debug_msg &quot;Generating index file in #@outputdir&quot;
+  ### Create index.html with frameset
+  def generate_index_file
+    debug_msg &quot;Generating index file in #@outputdir&quot;
     templatefile = @template_dir + 'index.rhtml'
     outfile      = @outputdir + 'index.html'
     index_path = index_file.path
-	  
-	  self.render_template( templatefile, binding(), outfile )
-	end
-	
-	### Strip comments on a space after 100 chars
+
+    self.render_template( templatefile, binding(), outfile )
+  end
+
+  ### Strip comments on a space after 100 chars
   def snippet(str)
     str ||= ''
     if str =~ /^(?&gt;\s*)[^\#]/
@@ -288,9 +288,9 @@ class RDoc::Generator::SHtml
     else
       content = str.gsub(/^\s*(#+)\s*/, '')
     end
-    
+
     content = content.sub(/^(.{100,}?)\s.*/m, &quot;\\1&quot;).gsub(/\r?\n/m, ' ')
-    
+
     begin
       content.to_json
     rescue # might fail on non-unicode string
@@ -309,11 +309,11 @@ class RDoc::Generator::SHtml
     string ||= ''
     string.downcase.gsub(/\s/,'')
   end
-  
+
   ### Copy all the resource files to output dir
   def copy_resources
     resoureces_path = @template_dir + RESOURCES_DIR
-		debug_msg &quot;Copying #{resoureces_path}/** to #{@outputdir}/**&quot;
+    debug_msg &quot;Copying #{resoureces_path}/** to #{@outputdir}/**&quot;
     FileUtils.cp_r resoureces_path.to_s, @outputdir.to_s, :preserve =&gt; true unless $dryrun
   end
 </diff>
      <filename>lib/sdoc/generator/shtml.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b28dbdc52ff31ab63cf3e115b6a5d17e2fb1d0f9</id>
    </parent>
  </parents>
  <author>
    <name>Vladimir Kolesnikov</name>
    <email>voloko@gmail.com</email>
  </author>
  <url>http://github.com/voloko/sdoc/commit/76621d7dad5ab422775f49ddad5171abdce8ac34</url>
  <id>76621d7dad5ab422775f49ddad5171abdce8ac34</id>
  <committed-date>2009-10-06T00:56:21-07:00</committed-date>
  <authored-date>2009-10-06T00:56:21-07:00</authored-date>
  <message>identation</message>
  <tree>412243738789fb8a41095993804208ebc3cb15db</tree>
  <committer>
    <name>Vladimir Kolesnikov</name>
    <email>voloko@gmail.com</email>
  </committer>
</commit>
