lib/rdoc/generator/markdown.rb in rdoc-markdown-0.3.5 vs lib/rdoc/generator/markdown.rb in rdoc-markdown-0.3.6

- old
+ new

@@ -149,15 +149,17 @@ end end def emit_classfiles @classes.each do |klass| - template = ERB.new File.read(File.join(TEMPLATE_DIR, "classfile.md.erb")) + template_content = File.read(File.join(TEMPLATE_DIR, "classfile.md.erb")) + template = ERB.new template_content, trim_mode: ">" + out_file = Pathname.new("#{output_dir}/#{turn_to_path klass.full_name}") out_file.dirname.mkpath - result = template.result(binding).squeeze(" ").gsub("\n ", "\n").squeeze("\n\n") + result = template.result(binding).squeeze(" ") File.write(out_file, result) end end