lib/genit/document_writer.rb in genit-0.4.1 vs lib/genit/document_writer.rb in genit-0.5
- old
+ new
@@ -17,13 +17,20 @@
# Save the document as an xhtml file.
#
# document - A Nokogiri::HTML or Nokogiri::XML document
# filename - The String name of the future saved document
def save_as_xhtml document, filename
+ @document = document
+ remove_remaining_tags
FileWriter.write document.to_xhtml, get_full_path(filename.force_html_extension)
end
private
+
+ def remove_remaining_tags
+ tags = @document.css 'genit'
+ tags.each {|tag| tag.remove}
+ end
def get_full_path filename
File.join(@working_dir, 'www', filename)
end